Skip to content
UX Atlas
Plate CMP·003 · ComponentGrid F2 · Rev. 2026-08-14

Text Input

Free-form entry, where the label, the hint and the error placement do most of the work.

ComponentCraft conventionFoundational

Definition

A text input collects typed data. Its usability is determined almost entirely by whether the user knows what to type, whether the field accepts what they type, and what happens when it does not.

Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.

On this plate
  1. 1Definition
  2. 2Anatomy
  3. 3Details that matter more than they look
  4. 4Details that change the typing experience
  5. 5In practice
  6. 6Local chart
  7. 7Continue from here

Reach for this when

  • Collecting free-form data.
  • Any form field without a fixed set of options.

Common mistakes

  • Placeholder used as the label.
  • Missing autocomplete attributes.
  • Paste disabled.
  • Field width unrelated to expected content.

Anatomy

  • A visible label above the field, always. Placeholder-as-label fails as soon as the user types.
  • Optional hint text below the label, describing format or purpose before the user types.
  • The field itself, with a visible border meeting 3:1 non-text contrast.
  • Error text below the field, associated with aria-describedby, with aria-invalid on the field.
  • Character counters where a limit exists, announced politely rather than on every keystroke.

Details that matter more than they look

  • Set autocomplete attributes correctly. WCAG 1.3.5 requires them for fields collecting user information, and they make browser autofill work.
  • Use inputmode and type to bring up the right mobile keyboard.
  • Size the field to suggest the expected input length. A postcode field the width of an address is misleading.
  • Never disable paste. It breaks password managers and is a genuine accessibility barrier.
  • Accept the formats people actually type, and normalise on the server.

Details that change the typing experience

AttributeEffect
type and inputmodeWhich keyboard appears on mobile
autocompleteWhether the browser or password manager can fill it
enterkeyhintWhat the return key on a mobile keyboard says
spellcheck and autocapitalizeWhether names and codes get mangled
maxlengthSilent truncation, so it needs a visible counter
Field widthAn implicit hint about the expected length

In practice

  1. i.

    The postcode field that autocapitalised

    Small attributes, large irritation

    Mobile keyboards capitalised and autocorrected a code field, so half the entries arrived malformed. Three attributes fixed what had been logged as a validation problem for months.

  2. ii.

    A field the width of its content

    Size as a signal

    A three-character field for a country code and a wide one for a street address tell the reader what is expected before they type. Uniform widths throw that information away.

Local chart

CMP·003 · Region III · Grid F2

This entry and the entries it is stated to connect with. Each line is labelled with what the connection means.

Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.

Principles behind this

The reasoning this solution is an application of.

Depends on

Get these right first, or this one will not hold.

Often used with

These usually appear in the same screen or the same decision.

Check your work

Review passes that test whether this was done properly.

Related concept

Connected closely enough to change how you apply this.