ink-cartridge
    Preparing search index...

    Type Alias LayerElement

    An element stored in a layer.

    Holds the element component, its props, and its keyboard-active flag.

    type LayerElement = {
        active?: boolean;
        element: ComponentType<any>;
        elementId: string;
        props?: Record<string, unknown>;
    }
    Index
    active?: boolean

    Whether this element is currently active. Defaults to true when omitted. Toggled via activateElement/deactivateElement (or their modal equivalents).

    This flag has nothing to do with React rendering — the element stays mounted either way. It is consumed by the keyboard engine: when an element is deactivated, its elementId is removed from the layer's activeElements set, so the keyboard engine stops dispatching key events to that element's bindings while keeping all registration data intact for a later reactivation.

    element: ComponentType<any>

    Elements to be applied to the layer

    elementId: string

    The ID of this element; it must be unique within the layer containing the element.

    props?: Record<string, unknown>

    Props passed to the element when it is rendered. Stored as a plain record; type safety lives at the applyElement call site, which narrows props to the element component's own prop type.