Tactile toggle preview

Tactile toggle

A recessed hardware switch with a grippy knob that slides across.

  • Group
    Toggles
  • Origin
    Adapted · useLayouts · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/tactile-toggle

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

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

<TactileToggle />

Props

PropTypeDefaultDescription
checked?booleanControlled state.
defaultChecked?booleanfalse
onChange?(checked: boolean) => void
label?string"Toggle"Accessible label.
size?string"1.5rem"Font size that scales the whole switch.
className?string

When to use

A single on/off setting where a physical, hardware feel suits the product.

When not to use

Lists of many settings (plain switches read faster) or tri-state values.

Related

Segmented control · Checklist