pattern-library 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.

Open source

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.

Evidence Role

This source is treated as pattern-library evidence. Use it to validate the decision rules above, not as a visual style reference.

Publisher: U.S. Web Design System. Last checked: .