---
id: fast-element.attr
title: attr() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-element](./fast-element.md) &gt; [attr](./fast-element.attr.md)

## attr() function

Decorator: Specifies an HTML attribute.

<b>Signature:</b>

```typescript
export declare function attr(config?: DecoratorAttributeConfiguration): (target: {}, property: string) => void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  config | [DecoratorAttributeConfiguration](./fast-element.decoratorattributeconfiguration.md) | The configuration for the attribute. |

<b>Returns:</b>

(target: {}, property: string) =&gt; void
