blessed-components - v1.20.0
    Preparing search index...

    Interface SwitchHandle

    Imperative handle returned by switchControl.

    interface SwitchHandle {
        checked(): boolean;
        focus(): void;
        setChecked(checked: boolean): boolean;
        toggle(): boolean;
        element: BoxElement;
        destroy(): void;
        setData(data: SwitchData): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    element: BoxElement

    Underlying Blessed element available for standard element operations.

    Methods

    • Sets an enabled switch state and reports whether setting occurred.

      Parameters

      • checked: boolean

      Returns boolean