Vue playground

Nova v3.37.0

Preview

Vue

Textarea

nv-fieldtextarea

A multi-line form field for longer or detailed text.

Live demo

Use a textarea for text that may run over several lines, such as comments, a problem description or a delivery note. For a single short value, use a text field.

Anatomy

A textarea with three callouts: 1 marks the label Field label, 2 the multi-line input showing the placeholder Input example, and 3 the description text below it.

The parts of a textarea.
  1. Label (optional) says what to write.
  2. Input holds several lines of text. rows sets its starting height, resize controls manual resizing, and autosize grows it with the text up to maxAutoHeight.
  3. Description (optional) adds guidance, such as a length limit.
rows="2"
rows · 3 default
rows="5"

States

Hover and focus styles are built in. required marks the label with an asterisk. A disabled textarea cannot be used, and a read-only one shows its text without allowing edits. Set error with an errorDescription that says how to fix the text: a red outline, warning icon and the message appear together. success adds a green outline and check icon once it is valid. The field is capped at 480 px; use fluid for a wider writing area.

readonly
error
success

Themes

The design includes Spark and Ocean appearances. Use the page's theme and mode controls to compare the live examples; retain the same labels, states and validation messages in each theme.

Guidelines

  • Name the purpose in the label, such as "Describe your issue".
  • Keep placeholders brief; put instructions in the description, which stays visible while people type.
  • Size the field for the expected text so people don't scroll.
  • When text is limited, set maxlength and show a character count supplied by your application; the textarea has no built-in counter.
DoSize the field for the expected text and state the limit.
Don'tAvoid a field so small that people must scroll to reread.

Sources