Recommended
01
Production default
Balanced spacing, hierarchy, and content for the most common product workflow.
Live preview
<Switch
value="sample-1"
/>
Theme-aware, responsive switch component.
Change any prop and inspect the server-rendered component immediately.
<Switch
value="sample-1"
/>
Compare configurations and resize the browser to check responsive behavior.
Balanced spacing, hierarchy, and content for the most common product workflow.
<Switch
value="sample-1"
/>
A tighter variation for dashboards, side panels, tables, and operational interfaces.
<Switch
size="sm"
label="Compact example"
value="sample-2"
/>
A more expressive variation using additional data, stronger emphasis, and optional states.
<Switch
size="lg"
label="Advanced example"
value="sample-3"
/>
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
label | string | "Switch" | No |
name | string | "" | No |
value | string | "on" | No |
checked | boolean | false | No |
disabled | boolean | false | No |
class | string | "" | No |