Skip to content

Checkbox

A choice that is applied later, with the form it belongs to.

The frame above shows the real web components, in the mode this site is in.

The design preview shows it next to every other web component.

  • For a setting that takes effect at once, use a Switch.
import { Checkbox } from "@acme/ui";
<Checkbox label="Remember me" checked={remember} onChange={setRemember} />

The web component’s props. The other platforms take the same options under their own naming conventions.

Prop Type Notes
checked boolean Required.
onChange (checked: boolean) => void Required.
label string Shown beside the box. Pressing it toggles too.
aria-label string Names the checkbox when there is no visible label.
name string
disabled boolean
Platform File
Web (React) packages/ui/src/Checkbox.tsx
Desktop (GPUI) crates/acme-ui/src/controls.rs
React Native packages/ui-native/src/Checkbox.tsx
Compose Multiplatform kotlin/ui/src/commonMain/kotlin/acme/ui/Checkbox.kt