Skip to content

Checkbox

Checkbox input with toggle/switch variant and indeterminate state support. Can be used standalone or within CheckboxGroup.

Import

typescript
import { Checkbox } from 'vuiii'

Basic Usage

vue
// Basic usage import { Checkbox } from 'vuiii'

<Checkbox v-model="accepted" label="I accept the terms" />

Props

PropTypeDefaultDescription
modelValueany-Checked state (v-model)
requiredbooleanfalseShows a required indicator
disabledbooleanfalseDisables the checkbox
switchbooleanfalseRenders as a toggle/switch
indeterminatebooleanfalseShows the indeterminate state
labelstring-Label text (alternative to default slot)
descriptionstring-Additional description text below the label
size'small' | 'normal' | 'large''normal'Checkbox size
valueParserValueParser<boolean>-Custom parser to map the checked state to a value

Slots

SlotDescription
defaultLabel content (alternative to label prop)
symbolCustom checkbox/switch symbol. Props: { checked, disabled, indeterminate, size }

Events

The Checkbox exposes its checked state through v-model (update:modelValue). It emits no other custom events.

More Examples

vue
// Switch variant (toggle)
<Checkbox v-model="enabled" switch label="Enable notifications" />
vue
// With description
<Checkbox v-model="newsletter" label="Subscribe to newsletter" description="Get weekly updates about new features" />
vue
// Required checkbox
<Checkbox v-model="terms" required label="I agree to the terms" />

Storybook

For interactive examples with all variants, see Checkbox in Storybook.

Released under the MIT License.