Theme Playground

Base UI

Checkbox

Boolean control for forms, preference lists, and bulk-selection states. Supports checked, unchecked, and indeterminate states.

Best for

preferences and consentbulk selectionmulti-choice filters

Import

import { Checkbox } from "@enadhq/enad-react-sdk/client/ui-resolver"

When to use it

Use Checkbox for independent yes or no choices, bulk actions, and filter sets where users can select more than one option.

If the user must choose exactly one option from a set, reach for a radio-style pattern instead of trying to coordinate several checkboxes.

State guidance

  • Use uncontrolled state for simple forms with defaultChecked.
  • Use controlled checked plus onCheckedChange when the surrounding UI needs to reflect aggregate state or persist changes immediately.
  • Disabled checkboxes should still keep nearby explanatory copy so people understand why the option is unavailable.

Composition notes

Pair Checkbox with Label so the whole row feels clickable and the accessible name stays explicit. In denser filter lists, keep vertical rhythm on the parent stack instead of adding spacing logic to the checkbox itself.

For bulk actions, place the parent checkbox near the collection title or toolbar action it controls. That makes the indeterminate state easier to interpret at a glance.

When branded styling needs to tune the internal checkmark, prefer the explicit indicatorClassName and iconClassName hooks over descendant selectors. That keeps the control customizable without depending on the primitive's internal SVG structure.

Examples

Live examples you can edit directly in the sandbox.

2 examples

Single checkbox with label

The default pattern for a standalone preference or consent field.

Indeterminate and disabled states

Use the indeterminate state for partial bulk selection, and disabled when the choice is intentionally unavailable.

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
indicatorClassNamestring
No description yet.
iconClassNamestring
No description yet.
asChildboolean
No description yet.