Skip to main content

@microsoft/fast-element > slotted

slotted() function

A directive that observes the assignedNodes() of a slot and updates a property whenever they change.

Signature:
export declare function slotted<T = any>(propertyOrOptions: (keyof T & string) | SlottedBehaviorOptions<keyof T & string>): CaptureType<T>;

Parameters

ParameterTypeDescription
propertyOrOptions(keyof T & string) | SlottedBehaviorOptions<keyof T & string>The options used to configure slotted node observation.
Returns:

CaptureType<T>