Text area

A text area lets people type text that runs over more than one line, like a description or a message

Overview

Use a text area when the answer needs a few sentences or more. It can have a label, a hint, and a character counter. The box grows as people type, up to a limit, and then scrolls inside.

There are 10 variants in total. With no error there are 4 states (placeholder, filled, focus, disabled). The general error and the length error each have 3 states (placeholder, filled, focus). A disabled field never shows an error.

For a single line of text, use the input.

Anatomy

  1. Label (optional): tells people what to write. It sits above the box.

  2. Box: the area where people type. It shows the placeholder until there is text.

  3. Hint (optional): short help text below the box. It is replaced by the error message when there is an error.

  4. Character counter (optional): shows how many characters are used, like 12/500. It sits at the right end, on the same line as the hint.

  5. Placeholder text: gives an example or brief instruction about what to enter. It appears inside the box when it is empty and disappears when people start typing.

Do and Don't

Do

Always give the text area a visible label, like “Feedback”

Dont

Use the placeholder as the label. It disappears once people start typing

Do

Show a character counter when there is a limit, like “120 / 500”

Dont

Hide the counter and cut off the text without telling anyone

Do

Write error messages that say what to fix, like “Write at least 20 characters. You have 12.

Dont

Use color alone to show an error, like a red border with no text, or a vague message like “Invalid input”

Properties

Error

Shows that the text isn't valid. There are three options.

  • None: no error.

  • General: for a missing required value, invalid content, or a server error.

  • Length: for text that is over the limit or under the minimum.

Character counter

Shows how many characters have been used out of the limit, like 0/500.

  • When to use: when there is a maximum or a minimum length.

  • When not to use: when the length doesn't matter. Leave it out so the field stays simple.

Label and hint

Both are optional. Use a label for every field. Use a hint when people need a rule or an example before they type.

States

Placeholder

The box is empty and the placeholder text is visible.

Filled

Someone has typed text.

Focus

The box is active and a ring appears around it. The ring turns red when there is an error.

Disabled

The box can't be focused or edited. It uses its own disabled colors.

  • When to use: when the field exists but can't be changed right now.

  • When not to use: when the reason isn't clear. If someone can't tell why a field is disabled, explain it nearby.

A disabled text area never shows an error.


Errors

General error

For a missing required value, invalid content, or a server error.

  • The border and the message turn red.

  • The character counter keeps its normal color.

  • The message replaces the hint.

Length error

For text that is over the limit or under the minimum.

  • The border, the message, and the character counter all turn red.

  • The message replaces the hint.

When errors appear

  • Most errors appear when someone leaves the field or submits the form.

  • A length error for going over the limit appears right away. People can keep typing past the limit.

  • Once an error is showing, it goes away as soon as the text is valid.

Rules and behaviors

Height

  • The minimum height is 4 lines (116).

  • The maximum height is 8 lines (212). After that, the text scrolls inside the box.

  • The box shrinks back when text is deleted.

  • Content below the field moves down as the box grows.

  • The line being typed always stays visible above the keyboard.

Behavior

  • Enter adds a new line. It doesn't submit the form.

  • The error message replaces the hint.

  • The character counter sits under the box, at the right, on the same line as the hint.

  • The counter color follows the length condition, not the error. A general error doesn't turn it red.

  • A disabled field can't be focused or edited.

Best practice

  • Tell people the limit in the hint before they reach it.

  • Keep error messages short and say how to fix the problem, like how many more characters are needed.

  • Let people keep typing past the limit, so they can edit their text down instead of losing it.

Accessibility

  • Every text area needs a label. If the label is hidden, it still needs an accessibility label.

  • Errors are shown with a message, not only with color.

  • The hint and the error message should be read out with the field.

  • The character counter shouldn't announce every key press.

  • Disabled fields can't be focused.

No headings found on page

Want to work together?

syahrulmiftahfarid@gmail.com

© 2026 Syahrul Miftah Farid

Want to work together?

syahrulmiftahfarid@gmail.com

© 2026 Syahrul Miftah Farid

Create a free website with Framer, the website builder loved by startups, designers and agencies.