@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    A checkbox / toggle-switch control.

    Supports two visual variants: a traditional checkbox and a toggle-switch. Both share the same API surface.

    Content is projected as the label text.

    <ui-checkbox [(checked)]="isEnabled">Enable feature</ui-checkbox>
    <ui-checkbox variant="switch" [(checked)]="darkMode">Dark mode</ui-checkbox>
    Index

    Constructors

    Properties

    ariaChecked: Signal<boolean | "mixed"> = ...

    The ARIA checked state accounting for indeterminate.

    ariaLabel: InputSignal<string | undefined> = ...

    Accessible label for the control.

    checked: ModelSignal<boolean> = ...

    Whether the checkbox is checked. Supports two-way binding.

    checkedChange: OutputEmitterRef<boolean> = ...

    Emitted when the checked state changes.

    disabled: InputSignal<boolean> = ...

    Whether the control is disabled.

    indeterminate: InputSignal<boolean> = ...

    Whether the checkbox is in an indeterminate state. Only applies to the checkbox variant. Visually indicates a "partially selected" state (e.g. in a select-all scenario).

    role: Signal<"checkbox" | "switch"> = ...

    The ARIA role for the control.

    variant: InputSignal<CheckboxVariant> = ...

    Visual variant: traditional checkbox or toggle switch.

    Methods

    • Handle keyboard interaction.

      Parameters

      • event: KeyboardEvent

      Returns void

    • Toggle the checked state on user interaction.

      Returns void