1. Docs
  2. Components
  3. Input Group

Input Group

Display additional information or actions to an input or textarea.

Installation

Anatomy

Examples

Icon

Text

Display additional text information alongside inputs.

Button

Add buttons to perform actions within the input group.

Tooltip

Add tooltips to provide additional context or help.

Textarea

Input groups also work with textarea components. Use block-start or block-end for alignment.

Spinner

Show loading indicators while processing input.

Label

Add labels within input groups to improve accessibility.

Pair input groups with dropdown menus for complex interactions.

Button Group

Wrap input groups with button groups to create prefixes and suffixes.

API Reference

InputGroup.Root

The main component that wraps inputs and addons.

PropTypeDefault
children
ReactNode
className
string

InputGroup.Addon

Displays icons, text, buttons, or other content alongside inputs.

PropTypeDefault
align
enum
"inline-start"
children
ReactNode
className
string

For InputGroup.Input, use the inline-start or inline-end alignment. For InputGroup.Textarea, use the block-start or block-end alignment.

InputGroup.Button

Displays buttons within input groups.

PropTypeDefault
size
enum
"xs"
variant
enum
"ghost"
children
ReactNode
className
string

InputGroup.Text

Displays text content within input groups.

PropTypeDefault
children
ReactNode
className
string

InputGroup.Input

Replacement for Input when building input groups. Has input group styles pre-applied.

PropTypeDefault
className
string

All other props are passed through to the underlying Input component.

InputGroup.Textarea

Replacement for Textarea when building input groups. Has textarea group styles pre-applied.

PropTypeDefault
className
string

All other props are passed through to the underlying Textarea component.