Input Group

An input with icons, text or buttons attached.

⌘K

Installation

  1. Add the registryOnce per project
  2. Add input-group

Usage

Put the control first and the addons after it. Each addon's align places it around the control. Label the control itself, with an aria-label or a FieldLabel in a Field.

Composition

Examples

With a spinner

An addon can hold any small element, such as a Spinner.

With text

InputGroupText adds a prefix or suffix, such as a currency or a unit.

https://
.example.com
$
USD
Seat limit

With buttons

InputGroupButton is a small button that fits the group. Give icon-only buttons an aria-label.

Invalid

Set aria-invalid on the control to outline the whole group.

With a textarea

Use InputGroupTextarea in place of the input. Align addons to block-start or block-end to put them above or below it.

0/280

Large

Set size="lg" for a taller group.

$

Props

InputGroupInput and InputGroupTextarea are an Input and a Textarea.

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

InputGroup

InputGroupAddon

InputGroupButton