Components › Forms & input › Text field › Amount input

Amount input

canon

Amount or count typed as a mask: digits and separators only, thousands grouped as you type, a dot read by context (12.345 = thousands, 12.5 = decimal), nothing typed is ever cut off silently.

Merged to origin/main 28 September 2026 (acrm MR !4089). Replaces raw <input type="number"> for amounts on 16 app surfaces (advances, benefits, expenses, KPI, costs, documents, pricing, assets, budgets, vehicles, cash desk, orders, phones). Raw value contract -?\d*(\.\d*)? unchanged for hosts. Dot rule and no-silent-truncation per AD 28 Sep 2026; caret anchoring after the decimal comma fixed in number-core (caretInFormatted), shared with RecordRail. Canon 28 Sep 2026 (AD approved M3; /ds renders the stories from the main build).

Used in 12 files · 9 areas · 13× — components/clen-tymu, components/dialog, components/org, components/products, pages/OrderDetailPage, pages/PokladnaDetailPage …

Keyboard

  • Typing digits, , and . works as described in Usage; letters and other characters are ignored.
  • Arrow ↑ / ↓ increment / decrement by one (replacement for the native number stepper).
  • The caret stays after the same digit while grouping spaces appear or disappear, including right after the decimal comma (12, + 5 → 12,5).
  • Tab / Shift+Tab move focus normally; on blur an undecided dot (12.5) becomes 12,5.

ARIA

  • Native <input type="text"> with inputMode="decimal" / "numeric" — mobile keyboards show digits.
  • Accessible name from the wrapping DS Field label or ariaLabel.
  • aria-describedby links the hint / error under a DS Field automatically (useFieldDescribedBy); a host can pass describedBy explicitly.
  • aria-invalid="true" when the host marks the value invalid, and for a count (decimals={0}) left with an undecided dot (12.3) on blur — that value is not saved.
  • The unit suffix is aria-hidden; the unit must be part of the label.

Focus

  • Standard DS input focus ring on the shell (.acrm-inputwrap:focus-within).
  • No focus traps; the field never moves focus on its own.

Contrast

  • Text uses --fg on --surface-100 (AA).
  • Suffix uses the muted tone of .acrm-amount-suffix; it repeats information already in the label, so it is not the only carrier of meaning.
  • Error state uses the DS field error ink (--critical-ink) plus aria-invalid.

Known limits

  • The dot rule applies to locales with a decimal comma (cs). In a decimal-dot locale (en) the comma is a grouping separator and the dot is always decimal.
  • A refused keystroke gives no audible feedback — the value simply does not change.

Source: docs/text-field/amount-input.a11y.md · GitLab