Skip to main content

Input Field

UI Design

What is an Input Field

An input field, or text field, is a box where users type information, such as a name, email address or password. It is the most common control in forms, search and settings.

Anatomy of an Input Field

  • Label: Says what to enter, always visible
  • Container: The box itself, filled or outlined
  • Placeholder: An optional hint that disappears on typing
  • Helper text: Extra guidance below the field
  • Error message: Explains what went wrong

Input Field states

Design every state: default, focused, filled, error and disabled. The focused state needs a clear outline, and the error state needs text, not just a red border.

Input Field best practices

Never use placeholder text as the only label, because it disappears as soon as users type. Keep labels close to their field and group related fields. Use the right input type, such as email or number, so mobile keyboards match the content.

Frequently asked questions

Can placeholder text replace a label?

No. Placeholder text disappears when users start typing, so they can forget what the field was for. Apple's guidelines recommend a separate label, and placeholder text should only give a hint or example.

What is the difference between filled and outlined text fields?

They are the two text field styles in Material Design. Filled fields have a shaded background and a bottom line; outlined fields have a border around the whole field. Both work; pick one and use it consistently.

Which states does an input field need?

At least default, focused, filled, error and disabled. Many systems also design read-only and hover states, plus helper text and error messages below the field.