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; pair it with a message that says what to fix.
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.
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.