Checkbox
A binary form control for opting into one or more independent choices.
CheckboxView sourceExample
The preview is interactive. The code below it is the docs demo source; demo-only layout classes can be omitted in application code.
import { Cell } from "retend";
import { Checkbox } from "innate-ui";
import { Icon } from "@/docs/icons/Icon";
export function CheckboxDemo() {
const enabled = Cell.source(true);
return (
<Checkbox value={enabled} onChange={(value) => enabled.set(value)}>
<Checkbox.CheckIcon>
<Icon name="check" data-slot-icon="checkbox-check" />
</Checkbox.CheckIcon>
Max bandwidth
</Checkbox>
);
}API reference
This table is generated from Innate UI's exported TypeScript declarations and JSDoc. Native element attributes inherited by a prop type are not repeated here.
CheckboxProps
| Prop | Type | Default |
|---|---|---|
valuerequiredChecked state. | JSX.ValueOrCell<boolean> | — |
onChangeCalled with the next checked state. | (value: boolean) => void | — |
childrenrequiredCheckbox label content. | JSX.Children | — |
disabledWhether the checkbox is disabled. | JSX.ValueOrCell<boolean> | false |
invalidWhether the checkbox is in an invalid state. Inherits from `Field`. | JSX.ValueOrCell<boolean> | false |
ariaDescribedByIds of elements that describe the checkbox. | JSX.ValueOrCell<string | undefined> | — |