---
id: fast-element.cssdirective.createbehavior
title: CSSDirective.createBehavior() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [CSSDirective](./fast-element.cssdirective.md) &gt; [createBehavior](./fast-element.cssdirective.createbehavior.md)

## CSSDirective.createBehavior() method

Creates a behavior to bind to the host element.

<b>Signature:</b>

```typescript
createBehavior(): Behavior | undefined;
```
<b>Returns:</b>

[Behavior](./fast-element.behavior.md) \| undefined

- the behavior to bind to the host element, or undefined.
