This page as markdown: /checkbox-card.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

CheckboxCard

Status: stable

A multi-select selection card — a card-sized Base UI Checkbox with a checkbox box, title, and optional description. The checkbox twin of RadioCard (same tone table). CheckboxGroup lays a column out and can own the selection: give each card a value and the group holds the checked values as an array, with an optional parent "select all" Checkbox.

Keywords: checkbox card, select card, multi select, option card

Usage

Use CheckboxCard when an option needs more visual weight, supporting text, or iconography than a plain checkbox row.

Best practices

Anatomy

Part Required Description
CheckboxCard yes One card-shaped checkbox option.
CheckboxGroup no A grouped set of related checkbox cards. Optionally owns the selected values and a parent "select all" checkbox.

Subcomponents

Name Type Description
CheckboxGroup { className?: string; children: ReactNode; value?: string[]; defaultValue?: string[]; onValueChange?: (value: string[]) => void; allValues?: string[]; disabled?: boolean } Column wrapper (role=group) over Base UI's CheckboxGroup. With no group props it is layout only and each card stays independent. Pass value/defaultValue/onValueChange (string[]) and give each child a value to let the group own the selection — works for CheckboxCard and plain Checkbox children alike. Add allValues plus a <Checkbox parent /> for a select-all box that turns mixed when only some are checked. disabled disables every child. onValueChange gets (value, eventDetails). Override the grid via className for multi-column layouts.

Props

Name Type Default Description
onCheckedChange (checked: boolean, eventDetails) => void — Fires with the next checked state (Base UI passes eventDetails second). Pair with checked for a controlled card; omit both to let it manage its own state.
title ReactNode — The card's primary label (text-title-sm).
description ReactNode — Optional supporting copy beneath the title (text-body-sm, muted).
icon ReactNode — Optional glyph (a solid ) in the tone colour. Its presence switches to the two-dimensional card RadioCard uses — icon top-left, checkbox top-right, copy below — so the two cards match in one form.
tone "neutral" | "3" | "2" | "1" | "info" | "warning" "neutral" Semantic colour the checked state carries across the border, checkbox box, and icon.
value string — Names the card inside a group-owned CheckboxGroup: the card is checked when the group's value array includes it. Also the value submitted with a form. Inside a CheckboxGroup, name stands in for value when value is omitted.
checked / onCheckedChange / defaultChecked / disabled Base UI Checkbox.Root props — Standard checkbox state. Without a group-owned value, each card is independent — drive checked/onCheckedChange per item for multi-select.
motion "full" | "subtle" | "off" "full" How much motion this component uses: full (default) inherits the app's policy, subtle keeps feedback and drops the flourish, off stills it. It can only turn motion down — it never overrides a reader's reduce-motion setting. Under subtle the tick fades in instead of drawing itself.

Variants

Tokens used

input, card, ring, primary, primary-foreground, accent, foreground, muted-foreground, tone-3, tone-3-foreground, tone-2, tone-2-foreground, tone-1, tone-1-foreground, tone-info, tone-info-foreground, tone-warning, tone-warning-foreground

Motion

Accessibility

Related

Examples

Group-owned selection

import { CheckboxCard, CheckboxGroup } from "@sableui/react"

<CheckboxGroup value={selected} onValueChange={setSelected}>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>

Select all

import { Checkbox, CheckboxCard, CheckboxGroup, Field } from "@sableui/react"

<CheckboxGroup allValues={REASONS} value={selected} onValueChange={setSelected}><Field label="All reasons" orientation="horizontal"><Checkbox parent /></Field>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>

A single independent card

import { CheckboxCard } from "@sableui/react"

<CheckboxCard title="Email me a receipt" description="Sent when the payment settles" checked={receipt} onCheckedChange={setReceipt} />

Toned with description

import { CheckboxCard } from "@sableui/react"

<CheckboxCard tone="1" title="Reports" description="Weekly usage reports by email" defaultChecked />