@microsoft/fast-foundation > reflectAttributes
reflectAttributes() function
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Reflects attributes from the host element to the target element of the directive.
Signature:export declare function reflectAttributes<T = any>(...attributes: string[]): CaptureType<T>;
Parameters
Parameter | Type | Description |
---|---|---|
attributes | string[] | The attributes to reflect |
CaptureType<T>
Example
const template = html`
<button
${reflectAttributes("aria-label", "aria-describedby")}
>
hello world
</button
`