Skip to content

Input Group

Display additional information or actions to an input or textarea.

https://

Install

Bash
npx @madeui/cli add input-group

Usage

TSX
import {
  InputGroup,
  InputGroupAddon,
  InputGroupButton,
  InputGroupInput,
  InputGroupText,
  InputGroupTextarea,
} from '@/components/ui/input-group';

Composition

TSX
<InputGroup>
  <InputGroupAddon>
    <InputGroupText />
  </InputGroupAddon>
  <InputGroupInput />
  <InputGroupAddon align="inline-end">
    <InputGroupButton />
  </InputGroupAddon>
</InputGroup>

Icon

Button

Kbd

Pair with the Kbd component to show a keyboard shortcut.

⌘K

Spinner

Textarea

Use InputGroupTextarea in place of InputGroupInput — pairs with align="block-start" / align="block-end" addons.

API reference

The group draws the border and focus ring (:focus-within); the control inside renders bare. Clicking an addon focuses the input.

InputGroupAddon

PropTypeDefaultDescription
align'inline-start' | 'inline-end' | 'block-start' | 'block-end''inline-start'Block alignments need a column layout — pass style with flexDirection: 'column' on the group.

InputGroupButton

PropTypeDefaultDescription
size'xs' | 'iconXs' | 'iconSm''xs'Compact button sizes for inside the group.
variantButtonVariant'ghost'

All parts accept a style prop (StyleXStyles, merged last).

Was this page helpful?