ns-checkbox
Overview
The ns-checkbox component renders a clickable checkbox. It can be used with a full NexoPOS field object or with direct checked and label props.
Props and event
field: optional field definition. When provided, the component togglesfield.value.checked: direct checked state when no field object is used.label: direct text label when no field label is used.- Emits
changewith the next checked state.
Usage
const field = {
name: 'is_active',
label: 'Active',
type: 'checkbox',
value: true,
description: 'Enable this option.',
errors: []
};
<ns-checkbox :field="field" @change="handleChange" />
When the component is rendered through ns-field, NexoPOS automatically passes the field definition and forwards change handling to the parent form.