Checkbox
A checkbox whose tick wipes in along its stroke. In a group, a parent that selects all ticks its boxes one after another.
Examples
Default
Wrap it in a <label> with its text. The tick wipes in from the start of its stroke, and wipes back out when cleared.
Parent
In a CheckboxGroup with allValues, a checkbox with parent selects all. It shows a dash while only some are picked, and the boxes it changes tick one after another.
Table rows
Each row is a <label>, so a press anywhere on it picks the row. Name a box that has no text with aria-label.
Invalid
Set aria-invalid once the person tries to go on without it, and point aria-describedby at the reason.
Disabled
A disabled box fades and can’t be pressed. Say why beside it, as here, so nobody wonders.
Installation
npx shadcn@latest add https://kinoui.com/r/checkbox.json- Files
lib/reduce-motion.tslib/resize.tslib/choice.tscomponents/kino/checkbox.tsx- Packages
@base-ui/react- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Checkbox
CheckboxGroup
Data attributes
Accessibility
- It is a native-feeling checkbox: Space ticks it, and a press on its
<label>does too. - A box with no text beside it needs
aria-label, such as "Select LED-482". - The parent is announced as mixed while only some are picked.
- Ticked, cleared and some each have their own mark, so state never relies on colour. In forced colours the box fills with the system highlight.
- When the system asks for less motion, the tick appears at once and a group ticks every box together.