formscheckbox
Checkbox
Single checkbox control with card and list variants and custom true/false values.
Import#
Slot Structure#
Checkbox indicator with optional label and description.
Examples#
Variants#
List and card variants with start/end/hidden indicator positions.
Sizes#
Scale from xs to xl with unified label spacing.
Indeterminate + Custom Icons#
Custom checked/indeterminate icons with controlled indeterminate transition.
Custom True/False Values#
Map checked state to domain values instead of boolean.
API Reference#
Attributes#
Slot
root0 attributesLabelable checkbox wrapper that coordinates input, indicator, and text content.
No attribute metadata for this slot.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | "indeterminate" | TTrue | TFalse | undefined | — | Whether the checkbox is checked (controlled). |
| checkedIcon | IconT.Name | icon-check | Icon to show when checked. |
| class | ClassValue | — | Class applied to the component root or trigger element. |
| classes | CheckboxT.Classes | undefined | — | — |
| defaultChecked | boolean | "indeterminate" | undefined | false | Whether the checkbox is checked by default (uncontrolled). |
| description | JSX.Element | — | Description text for the checkbox. |
| disabled | boolean | undefined | false | Whether the input is disabled. |
| falseValue | TFalse | undefined | false | Value to use when the checkbox is unchecked. |
| formFieldBind | boolean | undefined | true | Whether to bind the checkbox value to the parent FormField. |
| id | string | undefined | — | The ID of the input element. |
| indeterminate | boolean | undefined | false | Whether the checkbox is in an indeterminate state. |
| indeterminateIcon | IconT.Name | icon-minus | Icon to show when indeterminate. |
| indicator | "hidden" | "end" | "start" | undefined | — | — |
| label | JSX.Element | — | Label for the checkbox. |
| name | string | undefined | — | The name of the input element, used for form submission. |
| onChange | ((value: TTrue | TFalse) => void) | undefined | — | Callback when the checked state changes. |
| onPointerDown | JSX.EventHandlerUnion<HTMLButtonElement, PointerEvent> | undefined | — | Pointer down handler for the checkbox control. |
| readOnly | boolean | undefined | false | Whether the input is read-only. |
| ref | JSX.HTMLElementTags["div"] extends { ref?: infer Ref; } ? Ref : never | undefined | — | — |
| required | boolean | undefined | false | Whether the input is required. |
| size | "xs" | "sm" | "md" | "lg" | "xl" | undefined | — | — |
| style | JSX.CSSProperties | undefined | — | — |
| styles | CheckboxT.Styles | undefined | — | — |
| trueValue | TTrue | undefined | true | Value to use when the checkbox is checked. |
| value | string | undefined | on | Native value submitted when the checkbox is checked. |
| variant | "list" | "card" | undefined | — | — |