Measured entry
hextaui-toggle
A pressable React toggle for toolbar actions and compact on-or-off controls. It ships as a client-side shadcn registry component wrapping Radix Toggle, with default and outline variants plus size options. Its styling assumes Tailwind theme utilities, class-variance-authority, and a project-local cn helper.



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.0 KB (98.5 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 696ms error during build: [vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>re-cbf3b98beb4a/src/cut/components/ui/toggle.tsx".
Verdict
The component builds and mounts cleanly in the prepared harness, with no reported accessibility violations. It needs a shadcn-style setup: the bare build cannot resolve class-variance-authority, and the source also assumes the usual cn alias and Tailwind tokens. Adapt the demo wrapper for narrow layouts.
Use it if
- You need independent pressed-state buttons for formatting, visibility, or display controls.
- Your app already uses shadcn conventions, Tailwind theme tokens, and a cn utility.
- You want Radix-managed toggle behavior while retaining direct control over labels, icons, and styling.
Skip it if
- You need a drop-in component for a project without Tailwind or shadcn-style aliases and utilities.
- You need mutually exclusive or coordinated selection, where a toggle group is the better primitive.
- You cannot adjust the supplied demo layout for narrow screens, since its fixed-width wrapper can overflow.
Install
| Declared dependencies | @radix-ui/react-toggle, 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 |
For a non-shadcn project, add Radix Toggle and class-variance-authority, provide a cn helper backed by clsx and tailwind-merge, configure the source alias, and define the Tailwind color, border, ring, radius, shadow, and dark-mode utilities referenced by the classes. Keep the file client-side in frameworks that distinguish server and client components.
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/preetsuthar17/HextaUIAlternatives
Other published entries for the button pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- neu-buttonneumorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- clay-buttonclaymorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 18.2KB
- Bare
- pass
- Prov
- NO
- tripled-animated-radio-shadcnuiminimal-flat
- Renders
- YES
- A11y
- 0
- Gzip
- 58.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glow-link-buttonliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 58.9KB
- Bare
- pass
- Prov
- NO
- tripled-mood-gradient-button-shadcnuigradient-glow
- Renders
- YES
- A11y
- 0
- Gzip
- 59.2KB
- Bare
- pass
- Prov
- NO
- ruixen-glass-ai-cardliquid-glass
- Renders
- YES
- A11y
- 0
- Gzip
- 59.5KB
- Bare
- pass
- Prov
- NO