pattern-library 2 linked patterns checked

U.S. Web Design System: Character count component

Documents character count support for text inputs and textareas with labels, hints, maxlength, aria-describedby wiring, default no-JavaScript limit messages, use cases for brevity or legal limits, and avoidance guidance for backend-only limits, implied lengths, or highly unlikely limit failures.

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.

  1. Start with the original. Open the source and find the guidance or example relevant to your task.
  2. Trace the connection. Use the claim notes below to see how this site applies the source to specific patterns.
  3. 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
Character count Choose character count when the limit is real, useful to users, and enforceable in the same unit displayed by the interface. The field accepts typing and paste normally; the counter observes length rather than blocking editing prematurely. USWDS character count guidance supports real limits, associated count messages, fallback text, and avoidance of unnecessary counters.
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 character count guidance supports textarea limits with associated remaining-count messages.

Comparisons supported by this source

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: .

Saved items