Switch

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

Settings row

A labelled binary setting with a moving thumb and explicit status

A concise activity summary every Monday morning.

On

Controlled and disabled

External controls update the same bound state; managed settings remain visibly unavailable

Controlled state: off

Managed by your organization

Both Switch.Root and Switch.Thumb expose data-state="checked|unchecked". The root also exposes data-disabled; bind checked when an external control must drive the switch.

A name on the root creates a hidden input for form submission. Its checked payload defaults to "on", value supplies a custom payload, and required is applied to that hidden input so native form validation can require the switch to be on.