Home
NexoPOS

ns-textarea

Overview

The ns-textarea component renders a multiline input bound to field.value. It is used by ns-field when field.type is textarea.

Props and events

  • field: required field definition.
  • placeholder: placeholder text passed to the textarea.
  • leading: adds left padding for a leading element.
  • type: compatibility prop.
  • Emits blur and change with the component instance.

Rows

The textarea uses field.data.rows when provided. If no row count is supplied, it defaults to 10 rows.

const field = {
    name: 'description',
    label: 'Description',
    type: 'textarea',
    value: '',
    data: { rows: 6 },
    errors: []
};
<ns-textarea :field="field" placeholder="Write a description" />