Toggle Segmented Theme
UnlimitedA light / dark / system picker with a sliding thumb and icons that react when chosen, paired with a miniature window that wipes between themes and splits in two for "system".
togglethemesegmenteddark-moderadio
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/toggle-segmented-theme.tsx. This is an Unlimited component, so the CLI needs your API key: set it up once, then install it by name.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
More toggles & switches
- Toggle Day NightA theme switch drawn as a tiny sky: the sun rolls across and becomes a cratered moon, clouds sink away and stars pop out one by one.
- Toggle Icon MorphA switch with a glyph inside the thumb: the two strokes of the cross swing and re-join into a check as the thumb rolls across.
- Toggle iOS With Label ListA settings card of labelled switches under a master toggle; turning the master off folds the dependent rows away with a staggered collapse.
- Toggle Like BookmarkIcon toggles that each fill in their own way: the heart pops, the bookmark drops in from above, the star spins and the bell rings, all with a ring burst.
- Toggle Lock ShakeA switch that can be locked: clicking it then shakes its head, rattles the padlock in the thumb and pops up the reason it cannot change.
- Toggle Spring SwitchA switch whose thumb stretches toward the other side while pressed, then snaps across with a little overshoot on release.