Measured entry

hextaui-toggle-group

switchminimal-flat

A client-side React toggle group for single or multiple selection, shipped as a shadcn registry TypeScript component. It wraps Radix Toggle Group, reuses a separate toggle component for variants, and relies on the cn utility, class variance authority, clsx, tailwind-merge, and Tailwind classes.

Specimen
Harness screenshot of hextaui-toggle-group at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of hextaui-toggle-group at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of hextaui-toggle-group 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 hextaui-toggle-group
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal38.8 KB (104.3 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 998ms
error during build:
[vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>re-926111da46bf/src/components/ui/toggle.tsx".

Verdict

A solid Radix-based choice control once it is inside its intended design system, with a clean mount and no detected accessibility violations. It needs a shadcn-style setup and does not work bare because its shared toggle dependency expects class variance authority and project aliases.

Use it if

  • You need an accessible toolbar-style choice control with single and multiple selection modes.
  • Your project already follows shadcn conventions for component aliases, shared variants, and Tailwind utilities.
  • You want grouped outline toggles with consistent sizing and optional spacing.

Skip it if

  • Your control must fit a narrow viewport without adjusting the demo container or allowing wrapping.
  • You want a standalone dependency-light component with no shared toggle module or utility aliases.
  • You need native form submission behavior without adding hidden inputs or state synchronization.

Install

Installation record for hextaui-toggle-group
Declared dependencies@radix-ui/react-toggle-group, @radix-ui/react-toggle, 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, install Radix Toggle Group, Radix Toggle, class variance authority, clsx, and tailwind-merge. Add the cn helper, copy the shared toggle component, replace the project aliases with local paths, and ensure Tailwind processes the supplied utility classes.

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-17

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.