Skip to content

Checkbox

The checkbox is used when multiple items are selected in a list. Users can choose zero, one, or any number of items.

Checkbox

Allows user to toggle between checked, unchecked, and indeterminate states.

Import

js
import { MpCheckbox } from '@mekari/pixel3'

Playground

API

MpCheckbox

Props
Events
Slots
NameTypeDefault
id
Id of checkbox.
string -
name
Name of checkbox.
string -
value
Value of checkbox.
string -
model-value
modelValue for group of checkbox.
array -
is-checked
If true, checkbox will be checked.
booleanfalse
is-indeterminate
If true, checkbox will be indetermintate.
booleanfalse
is-disabled
If true, checkbox will be disable.
booleanfalse
is-invalid
If true, checkbox will be invalid.
booleanfalse
is-read-only
If true, checkbox will be read only.
booleanfalse

Usage

Checkbox Group

With Description

Accessibility

WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/

  • Provide aria-label and or aria-labelledby for screen reader support.
  • When checked, checkbox has aria-checked set to true.
  • When not checked, checkbox has aria-checked set to false.
  • When partially checked, checkbox has aria-checked set to mixed.