Checkbox

An 18px box: raised and ringed, ink when checked, with a check that draws itself.

View source
import { Checkbox, CheckboxGroup } from "@logicplanes/kaeso-ui";

Props

  • aria-describedby
    string

    The ids of the elements that describe it.

  • aria-label
    string

    The accessible name, for when there is no visible label.

  • aria-labelledby
    string

    Names the box by other text, such as the first line of a row whose label holds more.

  • checked
    boolean

    Whether it is checked, when you control it.

  • defaultChecked
    boolean

    Whether it starts checked, when the component keeps its own state.

  • description
    ReactNode

    One sentence of help under the label.

  • disabled
    boolean

    Turns it off: it can't be used, and it looks dimmed.

  • id
    string

    The id of the control, so a label elsewhere can point to it.

  • indeterminate
    boolean

    Shows a dash: some, but not all, of a group is checked.

  • invalid
    boolean

    Shows it as invalid; pair it with a message that says what to fix.

  • label
    ReactNode

    The label; the whole row becomes the target.

  • name
    string

    The 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.

  • readOnly
    boolean

    Shows the value without letting people change it.

  • required
    boolean

    Marks it as required in a form.

  • value
    string

    The value sent with the form, and the value in a CheckboxGroup.