Input Field
UI DesignWhat 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.
Related terms
View all UI Design terms →Error State
An error state is the visual change that shows something went wrong , such as an invalid form field, a failed upload or a page that could…
Focus State
A focus state is the visual indicator that shows which element has keyboard focus . When users press Tab to move through a page, the focus…
Combobox
A combobox is an input field combined with a popup list of options . Users can type to filter or enter a value, then pick from the…
Search Bar
A search bar is a text field where users type a query to find content in a site or app. It usually shows a magnifying glass icon…
