# Switch

> Turns a setting on or off, applied at once.

- **Level**: atom · **Status**: stable · **Role**: input
- **Import**: `import { Switch } from "@rrios-forge/ui/atoms/switch";`
- **Source**: `packages/ui/src/atoms/switch`

Binary on/off toggle for instant changes. Composes `@radix-ui/react-switch` (`role="switch"`, `aria-checked`). Use Switch for changes that apply the moment the user toggles; use Checkbox for choices that apply on submit.

## Use it for

- Binary toggle / checkbox / radio group → `Switch` (in `SettingsField` with label) / `Checkbox` / `ChoiceGroup` with `Radio`

## Axes

| Axis | Part | Values | Default | Meaning |
|---|---|---|---|---|
| `size` | — | `sm` `md` `lg` | `md` | Ergonomic scale, in three families (control, text, container). |

## Stories

- [Playground](/?path=/story/components-atoms-switch--playground) · frame: `/iframe.html?id=components-atoms-switch--playground&viewMode=story`
- [Sizes](/?path=/story/components-atoms-switch--sizes) · frame: `/iframe.html?id=components-atoms-switch--sizes&viewMode=story`
- [States](/?path=/story/components-atoms-switch--states) · frame: `/iframe.html?id=components-atoms-switch--states&viewMode=story`
- [With label](/?path=/story/components-atoms-switch--with-label) · frame: `/iframe.html?id=components-atoms-switch--with-label&viewMode=story`

## Decisions that name it

- ADR-037 — Continuity motion: a decelerating curve, a travelling indicator, view transitions and the SegmentedControl

## Always

- Tokens only (R04); variants are semantic axes, never appearance (R02).
- Typography and actions are Poesía atoms, never raw HTML with utilities.
- Vibrant panes need a ground and never nest (ADR-027).
