PxCheckbox
A styled checkbox component. Supports binary (true/false) mode and array-based multi-check (like native <input type="checkbox">). Built as a self-contained component (no external checkbox library).
Usage
Demo
Binary Mode
Value: false
Array Mode
Selected: []
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| modelValuerequired | boolean | unknown[] | — | In binary mode: a boolean. In array mode: the array of selected values. |
| binary | boolean | false | When true, modelValue is a boolean toggle. When false, modelValue is an array. |
| value | unknown | undefined | The value added/removed from the modelValue array when checked/unchecked (array mode only). |
| inputId | string | undefined | HTML id for the input element. Use with a matching label for attribute. |
| disabled | boolean | false | Disables the checkbox. |
Emits
| Event | Payload | Description |
|---|---|---|
| update:modelValue | boolean | unknown[] | Emitted on checkbox change. |
| change | Event | Native change event. |