Skip to main content

Checkbox

Storybook

Go to Story

Checkbox()

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

ParameterType
__namedParametersCheckboxProps & 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"
/>