Checkbox
Storybook
Go to StoryCheckbox()
function Checkbox(__namedParameters): Element;
Defined in: src/components/Checkbox/Checkbox.tsx:38
Checkbox component, it implements just the Checkbox control input.
Use CheckboxGroup for a complete checkbox selection list component.
Parameters
| Parameter | Type |
|---|---|
__namedParameters | CheckboxProps & RefAttributes<HTMLButtonElement> |
Returns
Element
Examples
// It's typically used with a SideLabel for proper labeling
<SideLabel label="Show unread only">
<Checkbox checked={checked} onCheckedChange={setChecked} />
</SideLabel>
// With aria-label for standalone usage
<Checkbox
checked={checked}
onCheckedChange={setChecked}
aria-label="Checkbox"
/>