Moth Lantern Toggle
A moth settles into lantern glow when on.
Try it: Toggle — moth settles into the glow.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/moth-lantern-toggle.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/moth-lantern-toggle. You can also copy the source into components/ui/moth-lantern-toggle.tsx (view on GitHub).
Usage
import { MothLanternToggle } from '@/components/ui/moth-lantern-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
- Petal Circuit Toggle
Petals fold inward to complete a circuit.
- Frameflip Toggle
Tiny illustrated card flips between two states.
- Tideglass Toggle
Waterline rises and falls in a glass pane.
- Pulsebeat Switch
Soft heartbeat pulse when on; flat when off.
- Weather Vane Toggle
Vane pivots; grain shifts with wind.
- Ink Bloom Toggle
Track fills with a blooming ink blot when on.