Measured entry
originui-comp-101
A client-side bookmark toggle that pairs a controlled React pressed state with a tooltip whose label changes between adding and removing a bookmark. It ships as a shadcn registry component and composes local Toggle and Tooltip primitives, with Tailwind classes, Lucide React, Radix UI, clsx, and tailwind-merge in the dependency chain.



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 | 49.9 KB (115.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 774ms error during build: [vite]: Rollup failed to resolve import "lucide-react" from "<sandbox>re-cd587e276dfd/src/cut/components/ui/comp-101.tsx".
Verdict
A sound, accessible starting point that builds and mounts without provider setup, but it is more composition than feature: persistence is left to the host app, the dependency cost is notable for one control, and the narrow preview needs checking before release.
Use it if
- You need a compact bookmark or save action with an explicit hover and focus hint.
- Your app already uses shadcn-style Toggle and Tooltip primitives and Tailwind utilities.
- You want the pressed state controlled locally and easy to replace with persisted application state.
Skip it if
- You need bookmarking to persist immediately, because this component only keeps state in memory.
- Your interface must avoid narrow-screen overflow without additional layout validation; the supplied preview overflowed at the narrowest tested viewport.
- You want a dependency-light icon button and do not otherwise use the Radix-based toggle and tooltip stack.
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 React and Lucide React, install Radix UI with clsx and tailwind-merge, provide compatible Toggle and Tooltip wrappers, configure Tailwind utilities and the import alias, then connect the pressed state to real bookmark storage if persistence is required.
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