banira
    Preparing search index...

    Interface ScaffoldOptions

    interface ScaffoldOptions {
        aria?: boolean;
        formAssociated?: boolean;
        hydrate?: boolean;
        states?: boolean;
    }
    Index
    aria?: boolean

    Scaffold a custom element that reflects its ARIA role/state through ElementInternals (the Accessibility Object Model) — a checkbox-role toggle with internals.role/ariaChecked wiring and keyboard support, instead of the plain starter component. Distinct from formAssociated; pass one or the other.

    formAssociated?: boolean

    Scaffold a form-associated custom element (static formAssociated = true

    • ElementInternals wiring) that participates in <form> submission and validation, instead of the plain starter component.
    hydrate?: boolean

    Scaffold a component that hydrates a prerendered Declarative Shadow DOM root (adopt-or-render): if banira prerender already produced the shadow markup, it is adopted without re-rendering (no flash); otherwise the component renders normally. The constructable stylesheet is adopted either way. Distinct from formAssociated/aria; pass one.

    states?: boolean

    Scaffold a component that exposes internal state to CSS through custom states (ElementInternals.states / CustomStateSet), so authors style it with my-el:state(active) instead of the component leaking state into host attributes. Includes a setState(name, on) helper and an @cssstate tag recorded in the manifest's cssStates. A distinct starter; pass one.