Toggle

Form Controls
Local guide ↗ import { Toggle } from "bits-ui"

Icon toggle

bind:pressed synchronizes the icon, revealed value, status and pressed surface

•••••••••••••• Hidden

Controlled and locked

External controls share the pressed state; a disabled toggle communicates a fixed policy

Alerts: muted
Security alerts are locked on

pressed is the bindable boolean state. The root emits data-state="on" or data-state="off", and adds data-disabled when interaction is disabled. Icon-only toggles still need an accessible name such as aria-label.

Unlike Checkbox, Switch, and Radio Group, Toggle has no name, value, or required form props and does not render a hidden input. Mirror its pressed state into your own form field when a toggle must be submitted.