Measured entry

hextaui-switch

switchminimal-flat

A client-side React toggle built as a thin styled wrapper around Radix Switch. It ships as a shadcn registry item and relies on Tailwind utility classes, project theme tokens, and a cn helper backed by clsx and tailwind-merge.

Specimen
Harness screenshot of hextaui-switch at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of hextaui-switch at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of hextaui-switch 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-switch
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal34.5 KB (100.0 KB build, 65.5 KB baseline)
Bare modeOK
Provider requiredNO
Demo usedwritten from the component source API

Verdict

A solid minimal switch for an existing Radix and Tailwind stack. It builds and mounts cleanly, and the control has no detected accessibility violations. The narrow-screen overflow is caused by the fixed-width demo wrapper, not the switch itself.

Use it if

  • You need a compact controlled or uncontrolled switch with disabled and focus states already wired.
  • Your interface already uses Radix primitives and shadcn-style theme tokens.
  • You want a small control that accepts the underlying Radix Switch props without another abstraction layer.

Skip it if

  • You need a dependency-free control based on a native checkbox.
  • Your project does not use Tailwind or shadcn-style color tokens and you do not want to translate its styling.
  • You need a complete settings-field component that bundles its own label, description, validation, and layout.

Install

Installation record for hextaui-switch
Declared dependencies@radix-ui/react-switch, clsx, tailwind-merge
Missing on installnone
Bare installbuilds and mounts without the shadcn-style helpers
Providerno provider required in the harness

In a non-shadcn project, add React, Radix Switch, Tailwind, the required theme tokens, and a cn helper using clsx with tailwind-merge. Replace the project alias import if your resolver does not map it to the utility file.

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.