Checkbox

Renders a custom checkbox with an optional label.

Usage

import { Checkbox } from '@binarycapsule/ui-capsules';

Knobs 🎛

medium
<Checkbox
  onChange={function}
>
  Hello world
</Checkbox>

Props

NameDescription
checked
Required
boolean
The checked state of the checkbox.
onChange
Required
function
The function to handle the onChange event.
disabled
boolean(Default: false)
The disabled state of the checkbox.
size
"medium" | "large"(Default: "medium")
The size of the checkbox.
children
ReactNode(Default: undefined)
The Checkbox label. If omitted, remember to add an aria-label.