@metreeca/tile
    Preparing search index...

    Headless tabs.

    Holds a fixed set of labelled panels and the one on show, offering the activation a tab strip performs: a direct choice and the step to either neighbour, wrapping at both ends as keyboard navigation expects. A panel may be disabled: its label keeps its place, but no activation brings it on show and stepping passes it over.

    An activation yields new tabs and leaves these as they stand, so tabs read earlier keep their panels and their choice. One that changes nothing yields these tabs themselves, which a rendering layer takes as nothing to redraw.

    interface Tabs {
        labels: Readonly<Record<string, boolean>>;
        active: Optional<string>;
        select(label: string): this;
        next(): this;
        back(): this;
    }
    Index
    labels: Readonly<Record<string, boolean>>

    Whether each panel can be shown, keyed by its label: the labels in display order, unique and none of them blank.

    active: Optional<string>

    The label of the panel on show, or undefined if no panel is enabled.

    • Activates a panel.

      Parameters

      • label: string

        The label of the panel to show

      Returns this

      Tabs showing label, or these tabs if label is unknown, disabled or already on show

    • Activates the following enabled panel, stepping over disabled ones and wrapping from the last to the first.

      Returns this

      Tabs showing the following enabled panel, or these tabs if they hold no other enabled panel

    • Activates the preceding enabled panel, stepping over disabled ones and wrapping from the first to the last.

      Returns this

      Tabs showing the preceding enabled panel, or these tabs if they hold no other enabled panel