Skip to content

Text Input

Last updated 11 Nov 2026

NbTextInput is the primary text entry component. It wraps a native <input> or <textarea> with a label, validation messages, two layout variants, and four sizes. It is designed to sit flush on the same grid line as buttons and other form controls.

vue
<template>
  <NbTextInput
    v-model="value"
    label="Label"
    placeholder="Placeholder"
    helper="Helper text"
  />
</template>

Sizes ​

The four sizes are the same heights as NbButton's, so a field and a button of the same size line up.

Validation states ​

error takes priority over warning, which takes priority over helper.

Disabled and read-only ​

Content ​

  • The label is a noun phrase of one to three words, sentence case, no colon and no period: Email address, Project name.
  • A placeholder is optional, and the default is none. When you add one it shows the shape of the value (ACME-1024), never an instruction, and never anything the user needs once they start typing.
  • helper says what the user needs before they answer, as a sentence with a period, or a fragment without one (Maximum 200 characters).
  • error names the fix, not the failure: Enter a work email address, not Invalid input. Two lines at most.
  • State a limit the user can hit. With maxlength, add show-count so the limit is visible before it stops them.

Casing, punctuation and tone are set library-wide, not by this component: Writing style is the source.