InputGroup
Align units, prefixes, or actions with an input.
alpina-ui/ui/input-groupmm
Usage notes
Use an affix for a unit or prefix that belongs to the input. The group shares a visible focus and validation boundary, and long affixes can wrap.
When to use
Keep a prefix, unit or adjacent action visually attached to one editable value.
When to avoid
Several independent questions each need their own label and field instead of a shared border.
Accessibility
Give the editor an explicit label that includes the unit when it matters. Name any adjacent icon button separately.
| Key | Action |
|---|---|
| Tab / Shift+Tab | Move through any links or controls supplied inside the component, in document order. |
Content
Keep a fixed prefix short. Put explanations in the label or hint so that units and long translations leave room to type.
- Use
- Weight (kg) / 12
- Avoid
- 12 / ?
Copy in four languages
- German
- Gewicht (kg)12 characters
- French
- Poids (kg)10 characters
- Italian
- Peso (kg)9 characters
- Romansh
- Paisa (kg)10 characters
npx --no-install alpina add input-group