Checkbox

Three-state checkbox — checked, unchecked and indeterminate — with a theme-aware colour preset.

Source
1 file
Dependencies
none
Playground
yes

Examples

Every variant of the shipped component, live. Switch the layout to read them as a table or one at a time, and open Code for the file behind them.

Composition
01Default
02With description

By clicking this checkbox, you agree to the terms.

03Clickable card
Appearance
04Size
05Variant
06Color
07Radius
States
08Indeterminate
09Error
10Disabled
11Controlled
checked = true

Installation

One package for the whole library — run this once and every component on this site is importable. Adding the tokens to your stylesheet is the other half; the installation guide covers it.

npm install kipui
import { Checkbox } from "kipui";
Peer dependencies

react 19

react-dom 19

tailwindcss 4

Bundled dependencies

None beyond the peers above.

Usage

checkbox-example.tsx
import { Checkbox } from "kipui";

<Checkbox
  defaultChecked
  variant="primary"
  onCheckedChange={(checked) => console.log(checked)}
/>
  • `indeterminate` is what drives a correct select-all header — it is a visual state, not a third value.
  • `color` takes a raw CSS colour and wins over `variant`.

Playground

Change the props and the snippet underneath updates with them.

Preview

<Checkbox />

Props

5
<Checkbox size="md" variant="primary" radius="sm" />

API reference

Transcribed from the component's own types. Props with no default are required.

PropDefaultDescription
checkedbooleanrequiredControlled state. Pair with `onCheckedChange`.
defaultCheckedbooleanfalseUncontrolled seed value.
indeterminatebooleanfalseRenders the mixed state and sets `aria-checked="mixed"`.
onCheckedChange(checked: boolean) => voidrequiredFires with the next boolean state.
size"sm" | "md" | "lg""md"Box size.
variant"default" | "primary" | "success" | "warning" | "destructive" | "info""default"Theme-aware colour preset for the checked state.
radius"none" | "sm" | "md" | "full""sm"Corner radius preset of the box.
disabledbooleanfalseBlocks interaction and dims the box.
colorstringrequiredRaw CSS colour for the checked box. Wins over `variant`.
onChange(e: ChangeEvent<HTMLInputElement>) => voidrequiredThe raw input event, if you need it — `onCheckedChange` is usually what you want.