Skip to main content
Version: 1.x

@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

ParameterTypeDescription
attributesstring[]The attributes to reflect
Returns:

CaptureType<T>

Example

const template = html`
<button
${reflectAttributes("aria-label", "aria-describedby")}
>
hello world
</button
`