uibrik

Tactile Toggles

Preview

Customize

Accent
Squish6px

Usage

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

<TactileToggles />

Installation

npx shadcn@latest add https://uibrik.com/r/tactile-toggles.json
Adds the files to components/uibrik/tactile-toggles and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/tactile-toggles.

Props

TactileToggles
title
Type string
"Notifications"
Heading above the list.
accent
Type string
"#22c55e"
Switch colour when on, and the wash colour.
wash
Type boolean
true
Sweep a faint tint across the row when a switch turns on.
squish
Type number
6
How far the knob stretches while pressed.
items
Type ToggleItem[]
–
Rows: { id, label, description?, defaultChecked?, overrides? }. A row with overrides pauses those rows while it's on.
onChange
Type (id: string, checked: boolean) => void
–
Called when a switch flips.
className
Type string
–
Classes for the outer shell.