Checkbox

Checkbox whose fill appears as the check draws on, with a gentle haptic tick. Supports an indeterminate dash, can strike through a task’s label when ticked, and clearing fades the check out.

Preview

Props Changes apply to the live preview above.

Installation

npx @lumioui/cli add checkbox

Usage

import { Checkbox } from "@/components/ui/checkbox/checkbox";
<Checkbox />

Examples

List

A to-do app's Today list in orange.

States

The real home of the indeterminate state: an email preferences parent that summarises its children.

API reference

Prop Type Default
checked* boolean —
onCheckedChange* (checked: boolean) => void —
indeterminate boolean

Renders a dash instead of a check (partial selection). Implies the filled state.

false
label string

Text label rendered beside the box — tapping it toggles too, and the box announces it via accessibilityLabelledBy/aria-labelledby.

—
icon IconName

Leading icon rendered between the box and the label.

—
subtitle string

Secondary text under the label.

—
leading React.ReactNode

Custom leading node between the box and the label (brand mark, colour tile, avatar). Wins over icon.

—
trailing React.ReactNode

Trailing node pinned to the row's right edge (price, count, badge). Only rendered with label.

—
strikeWhenChecked boolean

Strike the label through and mute it while checked — task-list idiom.

false
disabled boolean —
className string —