---
id: fast-element.elementstyles.withbehaviors
title: ElementStyles.withBehaviors() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [ElementStyles](./fast-element.elementstyles.md) &gt; [withBehaviors](./fast-element.elementstyles.withbehaviors.md)

## ElementStyles.withBehaviors() method

Associates behaviors with this set of styles.

<b>Signature:</b>

```typescript
withBehaviors(...behaviors: Behavior[]): this;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  behaviors | [Behavior](./fast-element.behavior.md)<!-- -->\[\] | The behaviors to associate. |

<b>Returns:</b>

this
