pattern-library 2 linked patterns checked
U.S. Web Design System: Text input component
Defines text input as freeform letters, numbers, or symbols; recommends field widths that match expected answer length, delayed validation, avoiding placeholder-only help, and choosing alternatives for predetermined options.
Read with a purpose
What this source can teach
Use this source to compare a documented solution with the task and states in your own product.
- Start with the original. Open the source and find the guidance or example relevant to your task.
- Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
- Check the setting. Compare the source's platform, people, and constraints with your own decision.
Pattern Decisions This Source Supports
| Pattern | Supported decision | Required contract | Claim note |
|---|---|---|---|
| Text input | Choose text input when the user enters a short freeform value such as a reference, title, identifier, one-line note, or organization name. | Typing, deleting, selection, undo, and paste operate like a native single-line text field. | USWDS guidance supports freeform text input use, delayed validation, field-width matching, paste support, placeholder cautions, and accessibility checks. |
| Textarea | Choose textarea when the expected response is more than a short single-line answer. | Typing, selection, line breaks, paste, undo, redo, and spellcheck follow native textarea behavior. | USWDS text input guidance distinguishes paragraph responses that should use a textarea rather than a one-line field. |
Comparisons supported by this source
- Text input vs autocomplete vs select vs radio group
USWDS distinguishes freeform text input from predetermined options and recommends matching width, delayed validation, and avoiding placeholder-only guidance.
- Textarea vs text input vs inline validation vs error summary
USWDS advises using a text area instead of a single-line input for paragraph responses.
Evidence Role
This source is treated as pattern-library evidence. Its value comes from the specific claims and setting described above.
Publisher: U.S. Web Design System. Last checked: .