Skip to main content
  1. Docs
  2. Components
  3. Forms

Number field

A number, typed or stepped, formatted for the locale: 1,28,400 in en-IN.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<input>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • An exact number: seats, minutes, an amount.
  • A count people step through: 25 seats, then 30.
  • Money and per cent, formatted as people read them.
Not for
  • A position on a scaleSlider
  • Digits that aren't a quantity: a PIN, a phone numberText field

02

Anatomy

  1. 1number-field-input<input>The number, formatted for the locale as it's left.
  2. 2number-field-end<span>The unit after it.
  3. 3number-field-decrement<button>−: one step down; stops at min.
  4. 4number-field-increment<button>+: one step up; stops at max.

03

Do and don't

Quantities, not codes
DoA count or an amount: steps make sense.
Don'tA phone number with + and −.
No steppers on an amount
DoAn amount you type: steppers={false}.
Don'tSteppers on an amount nobody steps through.

04

Content

  • The unit as an affix: "minutes", ₹, never in the label as well.
  • Say the limits in the description: "Up to 500 on your plan."
  • Let the locale group the digits: 1,28,400.
Next — Number fieldAPI