39 Pro components and page blocks

Get Pro

Tactile Toggle

Preview

Customize

Accent
Squish6px

Usage

import { TactileToggle } from "@/components/uibrik/tactile-toggle/tactile-toggle";

<TactileToggle />

Installation

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

Props

TactileToggle
accent
Type string
"#22c55e"
Track colour when on.
squish
Type number
6
How far the knob stretches while pressed.
disabled
Type boolean
false
Stops the switch responding.
checked
Type boolean
–
Controlled state. Leave out to let the toggle keep its own.
defaultChecked
Type boolean
false
Starting state when uncontrolled.
onCheckedChange
Type (checked: boolean) => void
–
Called with the new state when the switch flips.
aria-label
Type string
Toggle
Accessible name, since the switch shows no text.
className
Type string
–
Classes for the switch.