Cosmic Sparkle Toggle
OFF/ON pill with a glowing star badge and halo.
Try it: Click the pill to sparkle on or off.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/cosmic-sparkle-toggle.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/cosmic-sparkle-toggle. You can also copy the source into components/ui/cosmic-sparkle-toggle.tsx (view on GitHub).
Usage
import { CosmicSparkleToggle } from '@/components/ui/cosmic-sparkle-toggle'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
checked | boolean | — | Controlled on/off state. |
defaultChecked | boolean | false | Uncontrolled initial state. |
onCheckedChange | (checked: boolean) => void | — | Fires when the value flips. |
disabled | boolean | false | Disables pointer and keyboard. |
Related Toggles components
- Blinker Switch
Classic switch whose knob blinks like an eyelid.
- Glass Orb Switch
Translucent glass sphere slides on a dark track.
- Mood Dial Toggle
Tiny face dial springs between two moods.
- Day Night Capsule
Illustrated mini sky that morphs day↔night.
- Ink Bloom Toggle
Track fills with a blooming ink blot when on.
- Watchful Eye Toggle
A soft eye opens and closes; the pupil tracks when open.