Switch animation
The thumb travels on your theme's curve and stretches toward where it's going while held.
with <Cuts />
What moves
| When | What you see | Timing | How |
|---|---|---|---|
| Switched | The thumb travels on your curve | 150 ms | Automatic |
| Held | The thumb stretches toward its other side | 70 ms | Automatic |
Install
Switch is shadcn's own component. With <Cuts /> in your root layout (Quick start), there's nothing else to add:
npx shadcn add switchTurn it off
Put data-cut="none" on a switch (or anything around it) to keep shadcn's own motion there. <Cuts responses="none" /> turns off every response across the app and keeps the cuts. With reduced motion, movement becomes a short fade or nothing.