All components

INPUTS / COMPONENTS

Toggle

Apply a setting immediately.

Live component15 documented props

About toggle

Use the Toggle for individual boolean choices that can be between on and off states exclusively. When dealing with a cell containing multiple selectable options, consider employing Checkbox instead.

01

Anatomy

Shared parts, named consistently.

  1. 1
    Toggle thumbRequired

    A small, movable graphical indicator that slides within the track to represent the Toggle's current state.

  2. 2
    Unchecked iconRequired

    The icon to indicate the Toggle is unchecked,

  3. 3
    Toggle trackRequired

    The container of the thumb.

  4. 4
    Toggle label

    The label of the Toggle.

  5. 5
    Checked iconRequired

    The icon to indicate the Toggle is checked.

Try the default

A working example with the shared V1 visual language.

When to use

Use for a binary preference that takes effect immediately. Keep the label constant in both states.

Tab focuses; Space changes the native switch state.

Related components

Source & adaptation

V1 semantic colors, DM Sans typography, compact controls, and responsive layouts. The API table describes this implementation; source design notes may use earlier API terminology.

components/ui.tsx