Measured entry
originui-comp-130
A client-side React theme toggle distributed as a shadcn registry component. It composes Origin UI's Toggle primitive with Lucide sun and moon icons, Tailwind utility classes, and local React state; the Toggle layer relies on Radix UI, clsx, and tailwind-merge.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | flagged at 375 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 33.9 KB (99.4 KB build, 65.5 KB baseline) |
| Bare mode | FAIL |
| Provider required | NO |
| Demo used | written from the component source API |
What the harness recorded
BARE BUILD
✗ Build failed in 966ms error during build: [vite]: Rollup failed to resolve import "lucide-react" from "<sandbox>re-70cd52865cc9/src/cut/components/ui/comp-130.tsx".
Verdict
A clean, accessible toggle shell that builds and mounts without special providers. Use it as presentation for an existing theme controller, not as a finished dark-mode feature, because its state only changes the icon and label.
Use it if
- You already use Tailwind and want a compact icon-only theme control.
- You want an accessible pressed-state toggle that can be wired into an existing theme system.
- You are comfortable installing an Origin UI registry dependency alongside the component.
Skip it if
- You need a drop-in theme switcher with document theme updates, persistence, or system preference handling.
- Your project avoids client-side React state or Tailwind utility styling.
- Your dependency budget does not justify Radix UI and Lucide for a single control.
Install
| Declared dependencies | radix-ui, clsx, tailwind-merge |
|---|---|
| Missing on install | none |
| Bare install | fails once the shadcn-style helpers are removed, so it needs that setup |
| Provider | no provider required in the harness |
In a non-shadcn project, add Tailwind styling, Lucide React, Radix UI, clsx, and tailwind-merge. Copy or recreate the Origin UI Toggle primitive, provide its class-merging helper, replace the registry import alias, and connect the pressed state to your theme manager.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/origin-space/originuiAlternatives
Other published entries for the switch pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- neu-toggleneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- clay-toggleclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.2KB
- Bare
- pass
- Prov
- NO
- ruixen-scrub-datetimeunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 22.2KB
- Bare
- pass
- Prov
- NO
- shadcn-switchunclassified
- Renders
- YES
- A11y
- 0
- Gzip
- 34.4KB
- Bare
- pass
- Prov
- NO
- hextaui-switchminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 34.5KB
- Bare
- pass
- Prov
- NO
- hextaui-tabsminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 39.0KB
- Bare
- pass
- Prov
- NO