Measured entry

originui-comp-130

switchminimal-flat

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.

Specimen
Harness screenshot of originui-comp-130 at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of originui-comp-130 at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of originui-comp-130 at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

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.

Harness measurements recorded for originui-comp-130
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal33.9 KB (99.4 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten 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

Installation record for originui-comp-130
Declared dependenciesradix-ui, clsx, tailwind-merge
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno 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.

License
MIT
Record published
2026-08-16

Alternatives

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.