Checkbox
Preview
Checkboxes let users select one or more items from a list, or turn an item on or off. See the Material 3 documentation for this component.
Props
ts
defineProps<{
// The ID for the checkbox.
id: string
// Whether the checkbox is checked.
modelValue?: boolean
// Whether the checkbox is in an indeterminate state.
indeterminate?: boolean
// Whether the checkbox is disabled.
disabled?: boolean
// Whether the checkbox is in an error state.
error?: boolean
}>()
defineProps<{
// The ID for the checkbox.
id: string
// Whether the checkbox is checked.
modelValue?: boolean
// Whether the checkbox is in an indeterminate state.
indeterminate?: boolean
// Whether the checkbox is disabled.
disabled?: boolean
// Whether the checkbox is in an error state.
error?: boolean
}>()
Known issues
This doesn't actually replicate the Material 3 checkbox cross-browser. This would need a lot of SVG stuff going on.