Pho Design System

Checkbox

Selects one or more options whose values are confirmed on submit. Built on Base UI Checkbox, with checked, unchecked, and indeterminate states. For an on/off setting that takes effect immediately, use Switch instead.

Import

import {
  Checkbox,
  CheckboxGroup,
  CheckboxCard,
} from "@photon-ai/pho-ui/components/checkbox";

States

Pass label for a clickable text row. indeterminate renders a dash — use it for a parent whose children are partially selected.

<Checkbox label="Unchecked" />
<Checkbox label="Checked" defaultChecked />
<Checkbox label="Indeterminate" indeterminate />
<Checkbox label="Disabled" disabled />

Sizes

Two sizes — sm and md (default). size scales the box and its glyph; the label keeps the body text size.

<Checkbox size="sm" label="Small" defaultChecked />
<Checkbox size="md" label="Medium" defaultChecked />

Group

CheckboxGroup tracks several checkboxes as one value. Each child sets a name; control the group with value / onValueChange or defaultValue.

<CheckboxGroup defaultValue={["email"]}>
  <Checkbox name="email" label="Email" />
  <Checkbox name="sms" label="SMS" />
  <Checkbox name="push" label="Push notifications" />
</CheckboxGroup>

Card

CheckboxCard wraps the same Checkbox in a bordered, selectable tile — pass title and an optional description instead of label. Use it when each option carries enough weight (a plan add-on, a notification channel) to deserve more visual presence than a plain labeled box. The whole tile is the hit target and carries the press feedback.

<CheckboxCard
  title="Email"
  description="Order updates and receipts."
  defaultChecked
/>
<CheckboxCard title="SMS" description="Delivery and shipping alerts." />

Card with icon

Pass icon when the option has a glyph — it stacks above the title and replaces the checkbox box.

<CheckboxCard
  title="Email"
  description="Order updates and receipts."
  icon={<IconMail />}
  defaultChecked
/>
<CheckboxCard
  title="SMS"
  description="Delivery and shipping alerts."
  icon={<IconMessage />}
/>

Props

Checkbox (<span role="checkbox"> + a hidden native input)

CheckboxGroup (<div>)

CheckboxCard

Accessibility

Best practices