Petal Circuit Toggle
Petals fold inward to complete a circuit.
Try it: Toggle — petals fold to complete the circuit.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/petal-circuit-toggle.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/petal-circuit-toggle. You can also copy the source into components/ui/petal-circuit-toggle.tsx (view on GitHub).
Usage
import { PetalCircuitToggle } from '@/components/ui/petal-circuit-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
- Tideglass Toggle
Waterline rises and falls in a glass pane.
- Moth Lantern Toggle
A moth settles into lantern glow when on.
- Weather Vane Toggle
Vane pivots; grain shifts with wind.
- Frameflip Toggle
Tiny illustrated card flips between two states.
- Theme Reveal Toggle
A sky-to-night switch: the sun rolls behind a crescent, clouds give way to stars, and the theme change blooms out of the switch as a circular View Transition reveal. Instant swap under reduced motion.
- Pulsebeat Switch
Soft heartbeat pulse when on; flat when off.