docs/components/input/Checkbox

Checkbox

Checkbox with indeterminate state.

import { Checkbox } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#More Examples

Disabled

<Checkbox label="Disabled" disabled />

Indeterminate

<Checkbox label="Partial selection" indeterminate />

#Props

PropTypeDefaultDescription
checkedbooleanControlled checked state.
defaultCheckedbooleanfalseInitial checked state for uncontrolled usage.
onChange(checked: boolean) => voidCallback when checked state changes.
labelstringLabel text displayed next to the checkbox.
disabledbooleanfalseDisable the checkbox.
indeterminatebooleanfalseShow an indeterminate/mixed state.
size'sm' | 'md' | 'lg''md'Size variant.
classstringAdditional CSS classes.
styleimport('solid-js').JSX.CSSPropertiesInline styles.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-bg-secondary
  • --sk-border
  • --sk-duration-fast
  • --sk-font-size-sm
  • --sk-radius-sm
  • --sk-space-sm
  • --sk-text-on-accent
  • --sk-text-primary