Files
2025-11-30 09:05:04 +08:00

1.3 KiB

  1. Home
  2. Components
  3. Switch

Switch

A control that allows the user to toggle between checked and not checked.

DocsAPI Referenceshadcn/ui## Props

Prop Type Default Description
...Radix props ComponentProps - All Radix switch root props

Examples

<Switch id="notifications" defaultChecked />

Usage

Switch Switch checked Switch disabled Switch disabled checked ```jsx

Switch
Switch checked
Switch disabled
Switch disabled checked
```