Blinker Switch

Classic switch whose knob blinks like an eyelid.

Try it: Toggle — the knob blinks as it travels.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/blinker-switch.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/blinker-switch. You can also copy the source into components/ui/blinker-switch.tsx (view on GitHub).

Usage

import { BlinkerSwitch } from '@/components/ui/blinker-switch'

Props

Component props
PropTypeDefaultNotes
checkedboolean—Controlled on/off state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(checked: boolean) => void—Fires when the value flips.
disabledbooleanfalseDisables pointer and keyboard.

See all 15 Toggles components