Skip to content
English
Don't know what it's called48 / 71

Prefix and suffix in a field

What it's calledInput affixprefix and suffixinput adornmentGlossary

What goes wrong

A bare field makes people guess the format, so prices arrive as 18, €18 and 18 eur, and weights in grams or in kilos.

The fix

Fix the currency, unit or period inside the field, so people type only the number.

Tell your AI

Show the currency, unit or period inside the field as a fixed prefix or suffix in var(--ds-text-3), var(--ds-space-8) (8px) from the value, never in the label or the placeholder; keep the field var(--ds-control-md) (36px) tall on var(--ds-surface-2) with var(--ds-radius-md) (14px) corners, and use the LayQ component text-input (/registry/v1/controls-text-input.json), which takes a prefix and a suffix.

  • --ds-text-3
  • --ds-space-88px
  • --ds-control-md36px
  • --ds-surface-2
  • --ds-radius-md14px
Why AI-generated UIs all look the same: 12 rules that fix it

Monthly coffee box

New listing · draft

Was that 18, €18 or 18 eur? People guess.