Home
NexoPOS

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 toggles field.value.
  • checked: direct checked state when no field object is used.
  • label: direct text label when no field label is used.
  • Emits change with 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.