Skip to content
SevenUI
Sign in
On this page

Switch

Displays a switch built on the Base UI Switch primitive, for turning a setting on or off with an accessible label.

Installation

Bash

Usage

API reference

Switch

Extends the Base UI Switch Root — all its props apply: checked/defaultChecked, onCheckedChange, name/value and uncheckedValue for form submission. The thumb is built in.

PropTypeDefault
size"default" | "sm""default"
checked / defaultCheckedbooleanfalse
onCheckedChange(checked: boolean) => void—
disabledbooleanfalse
name / valuestring — form submission—

Was this page helpful?