Checkbox
Checkbox with indeterminate state.
import { Checkbox } from '@ybouhjira/hyperkit';#Playground
Edit the code — the preview recompiles and re-renders as you type.
Loading preview…
#More Examples
Disabled
<Checkbox label="Disabled" disabled />Indeterminate
<Checkbox label="Partial selection" indeterminate />#Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Controlled checked state. |
defaultChecked | boolean | false | Initial checked state for uncontrolled usage. |
onChange | (checked: boolean) => void | — | Callback when checked state changes. |
label | string | — | Label text displayed next to the checkbox. |
disabled | boolean | false | Disable the checkbox. |
indeterminate | boolean | false | Show an indeterminate/mixed state. |
size | 'sm' | 'md' | 'lg' | 'md' | Size variant. |
class | string | — | Additional CSS classes. |
style | import('solid-js').JSX.CSSProperties | — | Inline 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