Accent theme

Base radius

Accent theme

Base radius

Colour scheme
Components

Checkbox

A real <input type="checkbox">. The visible box is a decorative sibling <span>, styled with :checked and :indeterminate, the input itself stays exactly where you click, invisibly, so focus, keyboard toggling, and the accessibility tree all come from the real element.

Usage
import { Checkbox } from "@kernelui/react";

<Checkbox defaultChecked>Remember me</Checkbox>

Props

PropTypeDefault
checked / defaultCheckedbooleanfalse
indeterminatebooleanfalse
onCheckedChange(checked: boolean) => void

Accessibility

  • indeterminate sets the DOM property directly, there's no HTML attribute for it, so :indeterminate in CSS works without any extra data attributes.
  • Space toggles it, clicking the label text toggles it, both for free.