ComponentsTextCounter

formstexulinot agent-emittableapp

TextCounter

text-counter

An input or textarea that shows remaining characters near the limit.

Live examples

Near limit

Near limit

Loading demo…

Props

Public props for TextCounter
NameKindRequiredDefaultDescription
valuestringno——
tagenum (input, textarea)no"input"—
typestringno"text"—
idstringno——
namestringno——
labelstringno——
placeholderstringno——
maxlengthnumberno256—
showAfternumberno20Show the count once this many characters remain
rowsnumberno3—
disabledbooleannofalse—
readonlybooleannofalse—
requiredbooleannofalse—
invalidbooleannofalse—
autosizebooleannofalse—
remainingLabelstringno"characters left"—
onValueChangeeventno——
classstringno——

Keyboard

Keyboard behavior for TextCounter
KeyAction
—See accessibility notes for keyboard behavior.

Accessibility

  • Remaining count is exposed via aria-describedby while focused near the limit.

Evidence for text-counter

Latest committed gates for text-counter (as of 2026-10-23). Static snapshot — not live CI.

Behavior

n/ano behavior scenario

No dedicated behavior scenario for this catalog id (a styled or display surface, covered by its unit and axe tests).

Size (gzip)

texuli/text-counter · budget 12.0 KiB

Budget from texuli.budgets.json; re-measure with `pnpm size --filter <entry>`.

Axe

documented

  • tests/e2e/site-component-pages.spec.ts
  • docs/quality (a11y-*)

Site component pages axe gate; package-level a11y docs under docs/quality when present.

Browsers

  • chromium
  • webkit
  • mobile

Playwright projects: Desktop Chrome, Desktop Safari, Pixel 7. Firefox is a known gap on this host.

When to use

Use when

  • Bounded free-text with a visible remaining count

Don’t use when

Prefer another component

  • Unbounded text without a max length