@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<TSource = any, TParent = any>(propertyOrOptions: (keyof TSource & string) | SlottedDirectiveOptions<keyof TSource & string>): CaptureType<TSource, TParent>;

Parameters

Parameter

Type

Description

propertyOrOptions

(keyof TSource & string) | SlottedDirectiveOptions<keyof TSource & string>

The options used to configure slotted node observation.

Returns:

CaptureType<TSource, TParent>