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

Input

The bare text box: a filled surface with a bottom line, an icon and affixes. A Field labels it.

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

01

When to use

Use it for
  • A text box inside your own Field: with a tool at its end, or a layout TextField doesn't give.
  • A toolbar search, with a hidden label.
  • Composing: Field labels any control the same way.
Not for

02

Anatomy

  1. 1input<div>The box: filled, with a bottom line; it takes the input's focus and state.
  2. 2input-start<span>Text before the value: ₹.
  3. 3input-control<input>The input itself: ref and native props land here.
  4. 4input-end<span>After it: a unit, or a tool.

03

Do and don't

Inside a Field
DoField names it, describes it and shows its error.
Don'tA bare box named only by its placeholder.
Affixes are part of the value
DoA unit the value is in: ₹, %, .qeet.in.
Don'tThe unit typed into the value, or left to guess.

04

Content

  • Affixes are short: a symbol or a word, never a sentence.
  • Read-only values stay selectable: give them a Copy button.
  • A hidden label is still written, for screen readers.
Next — InputAPI