Checkbox
An 18px box: raised and ringed, ink when checked, with a check that draws itself.
<Checkbox label="Log request content" description="Prompts and completions are stored for 30 days." defaultChecked />import { Checkbox, CheckboxGroup } from "@logicplanes/kaeso-ui";Props
aria-describedbystringThe ids of the elements that describe it.
aria-labelstringThe accessible name, for when there is no visible label.
aria-labelledbystringNames the box by other text, such as the first line of a row whose label holds more.
checkedbooleanWhether it is checked, when you control it.
defaultCheckedbooleanWhether it starts checked, when the component keeps its own state.
descriptionReactNodeOne sentence of help under the label.
disabledbooleanTurns it off: it can't be used, and it looks dimmed.
idstringThe id of the control, so a label elsewhere can point to it.
indeterminatebooleanShows a dash: some, but not all, of a group is checked.
invalidbooleanShows it as invalid; inside a
Fieldwitherror, it is invalid on its own and reads the message with it.labelReactNodeThe label; the whole row becomes the target.
namestringThe field name the value is sent under in a form.
onCheckedChange((checked: boolean) => void)Called with the new state when it is checked or unchecked.
parentbooleanMakes it the select-all box of a
CheckboxGroup: checked when every value in the group'sallValuesis, a dash when some are, and checking it checks them all.readOnlybooleanShows the value without letting people change it.
requiredbooleanMarks it as required in a form.
valuestringThe value sent with the form, and the value in a
CheckboxGroup.variant"default" | "card" = defaultThe box with its label beside it, or a row of a settings group with the box at the end (
card), as the rows of aCheckboxGroupwithvariant="cards"are.