ProNavigation
Day Night Toggle
A theme switch (role switch) where the sun morphs into a moon, the clouds sink and the stars come out, all on springs.
- Plan
- Pro · commercial license
- Dependencies
- React only
- Props
- 9 (7 adjustable)
Included in Pro and Lifetime. See pricing
Made with Furin: Pill Nav · Metal Button · Copy Morph
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | "" | Dark mode on (controlled mode). |
defaultChecked | boolean | false | Dark mode on mount (uncontrolled mode). |
onChange | (night: boolean) => void | "" | Called on change; receives true if it ends up night. |
size | number | 56 | Height of the switch, in px (the width is 2.3 times that). |
label | string | "Dark mode" | Accessible label. |
showLabel | boolean | true | Shows the day or night label below, in monospace. |
dayLabel | string | "Day" | Label for light mode, shown below the switch. |
nightLabel | string | "Night" | Label for dark mode, shown below the switch. |
autoplay | number | 0 | Seconds between automatic changes (0 = off; stops on interaction). |
Installation
With your license
1Set up the Pro registry once
Pro components aren't on npm or in the public shadcn registry: you install them with your license from Furin's private registry.
Use my license2Install Day Night Toggle
npx shadcn@latest add @furin-pro/ day-night-toggleDependencies
- React
- 18 or later
- Other libraries
- none
- License
- commercial
Pro components install into your project: the code is yours and there's nothing else to download.
Keep exploring
Elastic Slider
FreeA slider (role slider, full keyboard support) that stretches like rubber when dragged past its limits and snaps back with a bounce; the track squashes to preserve volume.
Navigation
A glass segmented control with a lens that slides between options.
Navigation