Forms
Checkbox
A native checkbox with a considered check: the box fills, then the tick draws itself in.
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
Copy
import { JCheckbox } from '@juxtui/ui'Usage #
Copy
<JCheckbox v-model="accepted" label="I agree to the terms" />Variants & examples #
With description#
A summary of activity, every Monday.
Only when someone mentions you directly.
Indeterminate#
For “select all” rows where only some children are checked.
Disabled#
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| modelValue | boolean | false | Bound with v-model. |
| label | string | — | Label text. The default slot overrides it. |
| description | string | — | Supporting text under the label. |
| indeterminate | boolean | false | Shows a dash. Set by you, typically from the state of child checkboxes. |
| disabled | boolean | false | Disables the checkbox. |
| required | boolean | false | Native required. |
| name | string | — | Form field name. |
| value | string | — | Form value when checked. |
Events
| Event | Payload | Description |
|---|---|---|
| update:modelValue | boolean | Emitted when toggled. |
Slots
| Slot | Props | Description |
|---|---|---|
| default | — | Custom label content. |
| description | — | Custom description content. |
Accessibility #
- Built on a native
<input type="checkbox">, visually replaced but never removed — forms, autofill and screen readers behave as expected. indeterminateis applied as the DOM property, so it is announced as “mixed”.- The hit area extends a few pixels beyond the box for easier pointer use.
Keyboard #
| Key | Action |
|---|---|
| Space | Toggles the checkbox. |