◇
Checkbox
2 partsAnatomy
Import the parts and compose them. Each part forwards attributes to its underlying element.
vue
import {
CheckboxIndicator,
CheckboxRoot,
} from '@robonen/primitives/checkbox';
<CheckboxIndicator>
<CheckboxRoot />
</CheckboxIndicator>API Reference
CheckboxIndicator
Indicator| Prop | Type | Description |
|---|---|---|
forceMount? | boolean | Keep mounted even when unchecked (for CSS exit animations). |
CheckboxRoot
Root| Prop | Type | Description |
|---|---|---|
defaultChecked? | CheckedState | Uncontrolled initial checked state. |
disabled? | boolean | Disable interaction. |
required? | boolean | Mark associated hidden input as required. |
name? | string | Hidden input name attribute. |
value? | string | Hidden input value attribute. |