R

Checkbox

2 parts

Anatomy

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
PropTypeDescription
forceMount?booleanKeep mounted even when unchecked (for CSS exit animations).

CheckboxRoot

Root
PropTypeDescription
defaultChecked?CheckedStateUncontrolled initial checked state.
disabled?booleanDisable interaction.
required?booleanMark associated hidden input as required.
name?stringHidden input name attribute.
value?stringHidden input value attribute.