neux - v0.17.3
    Preparing search index...

    Type Alias ElementConfig

    ElementConfig: {
        adoptedStyleSheets?: CSSStyleSheet[];
        attributes?: ReactiveProperty<
            Record<string, ReactiveProperty<unknown>> & ThisType<Node>,
        >;
        children?: ReactiveProperty<NodeConfig | NodeConfig[]>;
        className?: ReactiveProperty<string | string[]>;
        dataset?: ReactiveProperty<
            Record<string, ReactiveProperty<unknown>> & ThisType<Node>,
        >;
        namespaceURI?: string;
        on?: Partial<ElementLifecycle> & Record<
            string,
            (this: Node, event: any) => void,
        >;
        shadowRootMode?: "open" | "closed";
        style?: ReactiveProperty<
            Record<string, ReactiveProperty<unknown>> & ThisType<Node>,
        >;
        tagName?: string;
        use?: string | Element;
    } & Record<string, ReactiveProperty<unknown>> & ThisType<Node>

    Configuration object passed to render or used as a child config.

    Known keys (tagName, className, attributes, dataset, style, children, shadowRootMode, adoptedStyleSheets, namespaceURI, on, use) are handled by the renderer. All other keys are treated as element properties and bound reactively.

    Type Declaration

    • OptionaladoptedStyleSheets?: CSSStyleSheet[]

      Style sheets adopted by the shadow root.

    • Optionalattributes?: ReactiveProperty<Record<string, ReactiveProperty<unknown>> & ThisType<Node>>

      Map of HTML attributes to set on the element.

    • Optionalchildren?: ReactiveProperty<NodeConfig | NodeConfig[]>

      Child nodes or config objects rendered inside the element. Falsy entries are skipped automatically.

    • OptionalclassName?: ReactiveProperty<string | string[]>

      CSS class name(s) applied to the element. Array falsy entries are filtered automatically.

    • Optionaldataset?: ReactiveProperty<Record<string, ReactiveProperty<unknown>> & ThisType<Node>>

      Map of data-* attributes to set on the element.

    • OptionalnamespaceURI?: string

      Explicit namespace URI; auto-detected for SVG and MathML when omitted.

    • Optionalon?: Partial<ElementLifecycle> & Record<string, (this: Node, event: any) => void>

      Map of event names to handler functions. Includes native DOM events and lifecycle events: mounted, removed, updated.

    • OptionalshadowRootMode?: "open" | "closed"

      Shadow DOM mode for attaching a shadow root to the element.

    • Optionalstyle?: ReactiveProperty<Record<string, ReactiveProperty<unknown>> & ThisType<Node>>

      Map of inline CSS styles to apply.

    • OptionaltagName?: string

      Tag name.

    • Optionaluse?: string | Element

      A tag string, optionally with id and class selectors (e.g., "div#id1.cls1.cls2"), an HTML markup, or existing element.