Input Group

A composition pattern for attaching text, icons, and actions to an input.

Features

  • Composed from primitives
  • Text, icons, or buttons
  • Flexible inline layouts
  • Native input semantics

Examples

Composition patterns for Input.Root, TextArea.Root, and Button.Root: search chrome, prefix text, textarea footers, segmented buttons, and a busy state row.

Decorative icons use aria-hidden. Styling follows semantic tokens (border-border, bg-muted, text-muted-foreground, lucide-react) aligned with the legacy doc scenarios.

Search input

Leading search icon, controlled-looking layout, and a decorative keyboard hint. Icons use aria-hidden.

Preview

No preview output yet.

live.tsxReady

Prefix input

Static prefix text beside the field and a trailing decorative check icon.

Preview

No preview output yet.

live.tsxReady

Tall text area with a footer row for metadata and a primary action.

Preview

No preview output yet.

live.tsxReady

Button group

Input visually joined to a button segment and a trailing icon slot.

Preview

No preview output yet.

live.tsxReady

Processing state

Non-interactive row with spinner and label; use aria-busy on the container when wiring real async work.

Preview

No preview output yet.

live.tsxReady

Keyboard

ShortcutAction
TabMove focus to the next focusable control in the group.
Shift+TabMove focus to the previous focusable control in the group.
Character keysEdit the focused input or textarea using native browser behavior.
Backspace/DeleteRemove text around the caret in the focused input or textarea.
EnterSubmit the nearest form from a single-line input, or activate a focused button.
SpaceInsert a space in text fields, or activate a focused button.
Shortcut badgesPresentational only; wire real shortcuts with application handlers.

Accessibility

  • Always associate the input or textarea with a <label> using htmlFor and id.
  • Mark decorative icons and visual keyboard badges with aria-hidden="true".
  • Link helper text, counts, and validation messages with aria-describedby.
  • Use aria-live only for counts or status text that updates after input.
Previous
Input