Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Forms
  4. InputGroup

Forms

InputGroup

Joins fields, selects and buttons into one row with shared borders: an amount and its currency, a search and its button, a protocol and a domain.

import { InputGroup, TextField, Select, Button } from '@alea/ui';

Examples

InputGroup

Controls joined into one row: an amount with its currency, a search with its button, a protocol with a domain.

Anatomy

The parts of the component and the class that styles each one.

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Size

  • --alea-size-field…

Props

InputGroup props

Joins several controls into one row with shared borders: amount and currency, search and button, prefix select and text.

PropTypeDefaultDescription
childrenrequiredReactNode-Fields, selects and buttons to join into one control, like an amount and its currency, or a search and its button.
aria-labelstring-Name of the group for screen readers, when there is no visible label.
aria-labelledbystring-Id of a visible label for the group.
classNamestring-Extra class names.

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

States
Focus insideOpenKeyboard focus
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-input-group

Accessibility

  • A group: name it with aria-label or aria-labelledby so the parts are read as one.
  • Each control keeps its own label (visible or aria-label).

Keyboard

KeyDoes
TabMoves through the controls in order

Do and don't

Do

  • Join controls that set one value together.

Don't

  • Don't join unrelated fields just to save space.
Tested with axe, keyboard and screen reader roles