# Text Input and Text Area

> The boxes people type into, and how the size of the box sets the size of the answer. Search fields, password fields and when to use each one.

**Course:** [UI Components](https://learn.benibix.com/learn/design-user-interface)  
**Time:** 9 min

**After this lesson you can:**

- Pick a one-line or many-line box
- Build a search field people find
- Let people see a typed password

## Which box to use for a typed answer

A text input is a one-line box for a short answer, like a name, a town or a code. A text area is a bigger box with many lines, for a note or a review. The size of the box tells people how much to write. A one-line box asks for a few words. A tall box asks for a few sentences.

Getting this wrong hurts. Type a long message into a one-line box and the words slide out of sight to the left. Nobody can check what they wrote. A text area should show at least three or four lines, and it can grow as the user types more.

The width matters too. A box for a postcode should be short, and a box for a street address should be long. When every box on a form is the same width, people lose this clue and have to read every label more closely.

A search field is a box where you type words to find things. Most have a small magnifying glass icon and rounded ends, so people spot them at once. Put it where people expect it: at the top of the page, often on the right or in the middle.

A password field hides each letter behind a dot as you type. That stops someone reading it over your shoulder. But it also hides typing mistakes. Most good password fields now have a small eye button that shows the text, so people can check before they press Sign in.

Each of these boxes can also tell the phone what kind of keyboard to show. A box for an email gets the at sign on the main keys. A box for a phone number gets a number pad. That small choice saves taps on every form.

The common mistake is to hide a search field behind an icon to save space. People who came to search then have to find the icon first. If search is the main thing people do, show the whole box.

![Four boxes. A one-line text input with the name Emma typed in. A rounded search field with a magnifying glass and the gray words Search shoes. A tall text area with four lines of text. A password field showing eight dots and an eye icon, with a note that the eye shows what you typed.](https://learn.benibix.com/diagrams/ui-text-fields.svg)

### Example: A hotel form fixes its review box

A hotel's feedback form asked guests to write a review in a one-line box. Most reviews came back under 10 words long.

The designer swapped it for a text area 5 lines tall. The average review grew to about 40 words, with no other change.

**Words in this lesson:** [Text Input](https://learn.benibix.com/term/design/text-input), [Text Area](https://learn.benibix.com/term/design/textarea), [Search Field](https://learn.benibix.com/term/design/search-field), [Password Field](https://learn.benibix.com/term/design/password-field)

**Question:** When should you use a text area instead of a text input?

**Answer:** When the answer is a few sentences long. A text area has many lines, so it suits a note, a review or a message. A one-line text input suits a short answer like a name.

---

Source: https://learn.benibix.com/learn/design-user-interface/text-input-and-text-area
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
