# Tactile Toggles

> A settings list whose switches squish under the finger, drag like the real thing, sweep a faint tint across the row as they turn on, and pause the rows they override.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Components › Inputs |
| Live preview | https://uibrik.com/components/tactile-toggles |
| Writes | 1 file into `components/uibrik/tactile-toggles/` |
| Packages | `motion` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/tactile-toggles.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/tactile-toggles`.

Can't run commands? https://uibrik.com/components/tactile-toggles/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { TactileToggles } from "@/components/uibrik/tactile-toggles/tactile-toggles";

const items = [
  { id: "push", label: "Push notifications", description: "Mentions and replies", defaultChecked: true },
  { id: "digest", label: "Weekly digest", description: "A summary every Monday" },
  // …2 more
];

<TactileToggles
  title="Notifications"
  accent="#22c55e"
  wash
  squish={6}
  items={items}
  onChange={(id, checked) => {}}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/tactile-toggles.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Notifications"` | Heading above the list. |
| `accent` | `string` | `"#22c55e"` | Switch colour when on, and the wash colour. |
| `wash` | `boolean` | `true` | Sweep a faint tint across the row when a switch turns on. |
| `squish` | `number` | `6` | How far the knob stretches while pressed. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `items` | `ToggleItem[]` |  | Rows: { id, label, description?, defaultChecked?, overrides? }. A row with overrides pauses those rows while it's on. |
| `onChange` | `(id: string, checked: boolean) => void` |  | Called when a switch flips. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Notification settings**: A tint sweeping across the row as switches turn on makes each change visible. Pairs with [Settings Page](https://uibrik.com/components/settings-page.md) (Pro).
- **Feature flags**: Pausing the rows a switch overrides shows dependencies between settings.
- **App preferences**: A list of tactile switches suits mobile-style settings screens.

## Same shelf: Inputs

- [Tag Input](https://uibrik.com/components/tag-input.md): A field that turns typed or pasted text into chips that pop in and shrink out, with Backspace to select and remove, arrow keys to move between chips and a nudge for duplicates.
- [Time Morph](https://uibrik.com/components/time-morph.md) (Pro): A time chip that opens in place into scroll wheels: the time stays put while the hours, minutes and AM/PM around it roll into view, then fold back on the new time.
- [Type Fighter](https://uibrik.com/components/type-fighter.md) (Pro): A text field where each typed glyph flies in like a comet, or is written by pen.
- [Unsaved Changes](https://uibrik.com/components/unsaved-changes.md) (Pro): A settings form that keeps track of edits: a dot marks each changed field, Save counts them, pointing at Save lights them up with marks along the scroll edge for the ones out of view, and Cmd+S sends the dots flying into the button.
- [Voice Note](https://uibrik.com/components/voice-note.md) (Pro): A mic button that grows into a recording pill with a live waveform, settles that same waveform into a scrubber to play back, and folds into a check when sent.
- [Waitlist Input](https://uibrik.com/components/waitlist-input.md): An email field with its button inside that shrinks to a spinner, then settles into a confirmation in the same space.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/tactile-toggles/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
