Glass switch
A frosted track that tints with your colour, and a glossy bead of a thumb.
Customize
Props
Size
Installation
npx shadcn@latest add https://skinsui.dev/r/switch-glass.jsonUsage
usage.tsx
import { Switch } from "@/components/skins/switch-glass";<Switch label="Email updates" defaultChecked />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | None | The visible name of the setting. Without one, pass aria-label. |
| defaultChecked | boolean | false | On when it first renders. |
| disabled | boolean | false | Dims it and blocks interaction. |
| size | "sm" | "md" | "md" | Small or medium. The label grows with it. |
- labelNone
stringThe visible name of the setting. Without one, pass aria-label.
- defaultCheckedfalse
booleanOn when it first renders.
- disabledfalse
booleanDims it and blocks interaction.
- size"md"
"sm" | "md"Small or medium. The label grows with it.