# Switch

Toggle that flips between off and on with one physical move: the thumb's travel, on the theme's bouncy motion, nothing else animates.

```bash
npx shadcn add https://www.reelcn.dev/r/switch.json
```

Usage:

```tsx
<Center>
  <Switch id="notifications" label="Push notifications" steps={[{ at: 0, state: "off" }, { at: 1, state: "on" }]} />
</Center>
```

Use for:

- A settings row in a UI-sim walkthrough
- A `ui` scene's `component: "switch"`

Avoid:

- A single static state with no flip. Use plain text or an icon


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| id? | `string` | — |  |
| steps? | `Step<SwitchState>[]` | — |  |
| label? | `string` | — |  |
| place? | `Place` | — |  |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |