Forms
Checkbox
A box that turns an option on or off, with an animated tick, a label and a disabled state.
Group: Forms. Exports: Checkbox. shadcn/ui equivalent: Checkbox (partial parity).
Usage
import { Checkbox } from "./halaska-kit";
Checkbox props
checkedboolean: The controlled checked state.onChange(value) => void: Called with the new value.labelstring: Visible label.disabledboolean: Prevents interaction and dims the control."aria-label"any:
Accessibility
- Renders a native button with the checkbox role and aria-checked, so Space and Enter toggle it.
- The label text wraps the button, so clicking the text toggles it too.
- Without a label, pass aria-label to name it.
- Disabled uses the native disabled attribute, so the box leaves the tab order.
Known gaps
- No indeterminate state.
- No invalid state, and no description slot.
Halaska UI · Components · Patterns · Screens · Install