Textarea is a component that allows user to write text over multiple rows. Used when the expected user input is long. For shorter input, use the Input component.
<nord-textarea label="Label" value="Value"></nord-textarea>
Controls whether the textarea is resizable. By default is manually resizable vertically. Set to "auto" to enable auto-resizing as content grows.
Controls whether the textarea expands to fill the width of its container.
Controls the max allowed length for the textarea.
Controls whether to show a count of the number of characters in the textarea. When combined with
The size of the component.
Label for the input.
Optional hint text to be displayed with the input. Alternatively use the hint slot.
Visually hide the label, but still show it to assistive technologies like screen readers.
Placeholder text to display within the input.
Optional error to be shown with the input. Alternatively use the error slot.
Determines whether the input is required or not. An input marked as required will be announced as such to users of assistive technology. When using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.
Visually hide the required indicator, but still show required attribute to assistive technologies like screen readers.
Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.
Makes the component readonly, so that it is not editable. Readonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.
Makes the component disabled. This prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies.
The name of the form component.
The value of the form component.
Gets the form, if any, associated with the form element.
Fired as the user types into the input.
Fired whenever the input's value is changed via user interaction.
|Use when a label requires more than plain text.|
|Optional slot that holds hint text for the textarea.|
|Optional slot that holds error text for the textarea.|
Programmatically move focus to the component.
Programmatically remove focus from the component.
Programmatically simulates a click on the component.
CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.
Controls the inline size, or width, of the textarea.
Controls the block size, or height, of the textarea.
Controls the background of the textarea, using our color tokens.
Controls the text color of the textarea, using our color tokens.
Controls the border color of the textarea, using our color tokens.
Controls how rounded the corners are, using border radius tokens.
This component requires localization in a multi-lingual application. The following keys are required when registering a translation:
A function which receives the number of remaining characters and returns a string to be used as the aria-live message.
For full localization guidelines, please see Localization documentation.
This section includes guidelines for designers and developers about the usage of this component in different contexts.
- Use to allow text input where the expected input is long.
- Don’t use when the expected text input is short. Use input component instead.
Content guidelines #
Textarea labels act as a title for the text field. Labels should typically be short and in noun form:
When writing textarea labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):
When a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:
Do not use colons in textarea labels:
If you experience any issues while using Nord Web Components, please head over to the Support page for more guidelines and ways to contact us.