Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

Checkbox

Open .md
Live preview

Loading example…

Checkbox is part of the Atoms set, imported from @jcsoftdev/ui/atoms.

import { Checkbox } from "@jcsoftdev/ui/atoms";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/checkbox.

<Checkbox aria-label="Cita completada" />
Prop Type Default Description
classNames Partial<Record<CheckboxPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.
checked boolean | "indeterminate"
defaultChecked boolean | "indeterminate"
onCheckedChange ((checked: CheckedState) => void)
required boolean
name string
value string "on"
form string Id of the <form> the checkbox belongs to when it is rendered outside it.
label ReactNode Text shown next to the box. It renders a <label> tied to the checkbox, so it names it for assistive tech and a click on it toggles. Without it the checkbox is bare and needs aria-label.
description ReactNode
intent string
intentKey string

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/atoms/checkbox/checkbox.tsx