Checkbox
Checked, unchecked and mixed, with the tick drawn on as it checks.
Features
- Checked, unchecked and mixed.
- The tick draws on as it checks.
Use it for
- Forms and multi-select lists.
Installation
- Get runets.
git clone https://github.com/ziyam-khan/runets - Copy these files into your project, keeping their folders.
- Install what they use.
pnpm add react @base-ui/react motion lucide-react - Load the styles once. Bring your own base tokens, or use runets’ default theme.
import 'runets/styles/theme.css' import 'runets/styles/kit.css'
Usage
import { Checkbox } from 'runets'
<Checkbox label="Remember me" checked={v} onCheckedChange={setV} />
<Checkbox label="Some files" indeterminate />API
| Prop | Type | What it does |
|---|---|---|
checked | boolean | State. |
indeterminate | boolean | Mixed state. |
onCheckedChange | (v) => void | Called on change. |
label | string | Visible label. |
Accessibility
- Native checkbox semantics, including mixed.
Source
The code is in src/kit/controls.tsx in runets, MIT licensed.