Checkbox
Interactive documentation for the checkbox component. Change props in the playground, inspect states, and copy the generated example.
Preview
Code
<Checkbox
v-model="checked"
label="Check me"
description="This is a description"
required
/>Sizes
All available checkbox sizes.
s
m
l
xl
Colors
Available color variants in unchecked and checked states.
midnight
basil
amber
States
Dedicated examples for disabled, error, required, and description states.
Disabled
Error
Without description
Required
Props
This table matches the current CheckboxProps interface.
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| modelValue | boolean | undefined | Required | Current checkbox checked state. Used with v-model binding. |
| label | string | '' | Optional | Text displayed next to the checkbox. |
| description | string | undefined | Optional | Additional helper text displayed below the label. |
| required | boolean | false | Optional | Shows a required asterisk next to the label. |
| size | 'xs' | 's' | 'm' | 'l' | 'xl' | 'm' | Optional | Controls checkbox size, icon size, label text size, and description spacing. |
| color | 'midnight' | 'basil' | 'amber' | 'midnight' | Optional | Controls checked, hover, and focus colors. |
| error | boolean | false | Optional | Switches checked and focus styles to error state. |
| disabled | boolean | false | Optional | Disables checkbox interactions and applies disabled visual styles. |
| id | string | undefined | Optional | Native input id attribute. |
| name | string | undefined | Optional | Native input name attribute. |