unscripted/ui

Checkbox

A native checkbox restyled with appearance-none, with an SVG check that appears via peer-checked. All the semantics, none of the ARIA.

plain CSS — works everywhere

How it works

  • appearance-none clears the native look; checked:bg-primary paints the box.
  • The check glyph is a sibling SVG faded and scaled in with peer-checked:opacity-100 + peer-checked:scale-100pointer-events-none keeps it from stealing clicks.
  • Wrapping everything in a <label> makes the text clickable with zero attributes. Keyboard, forms, indeterminate state — all still native.