# Switch (/docs/switch)

A Base UI switch with a rounded center-pill press response.

## Install

```bash
npx shadcn@latest add https://4af.selfsimilar.dev/r/switch.json
```

## Usage

```tsx
import { Switch } from "@/components/ui/switch";

<Switch aria-label="Enable notifications" />
```

## API

**Main export:** `Switch`

A Base UI switch with a sliding thumb that expands toward the track's center while pressed
with a pointer.

`tone="adaptive"` (default) changes the thumb color with the checked state to contrast with the
track. `tone="fixed"` keeps the thumb dark in both states.