Skip to content

Forms

Checkbox

A yes or no that applies when the form is saved.

Installation

Terminal
pnpm add @elsikora/keystone-ui-kit

Usage

Import
import { Checkbox } from "@elsikora/keystone-ui-kit";
docs/checkbox/default.example.tsx
import { Checkbox, Field } from "@elsikora/keystone-ui-kit";
export default function CheckboxDefaultExample() {  return (    <Field label="I have read the release notes" orientation="horizontal">      <Checkbox />    </Field>  );}

Examples

Default

Checked and disabled

API reference

Checkbox

PropTypeDefaultDescription
checkedboolean | "indeterminate"-The state, when the caller holds it.
defaultCheckedboolean-The first state, when the component holds it.
onCheckedChange(checked: boolean | "indeterminate") => void-Called when it changes.
disabledbooleanfalseUnavailable.

Notes

  • Its hit area is 44 px though the box is smaller.