Skip to content

ShadowFactory type

Home > @rimitive/view > ShadowFactory

Shadow factory - returned from shadow(options) Callable with children to create RefSpec, or use .ref() to access shadow root

Signature:

export type ShadowFactory<TBaseElement> = {
(...children: ElRefSpecChild[]): RefSpec<TBaseElement>;
props(optsOrFn: ShadowOptions | ((current: ShadowOptions) => ShadowOptions)): ShadowFactory<TBaseElement>;
ref(...callbacks: ShadowLifecycleCallback[]): ShadowFactory<TBaseElement>;
};

References: ElRefSpecChild, RefSpec, ShadowOptions, ShadowFactory, ShadowLifecycleCallback