Input Group
A compound input component for attaching icons, text labels, and action buttons to an input field.
Installation
pnpm dlx stera-ui add input-groupUsage
import {
InputGroup,
InputGroupAddon,
InputGroupInput,
InputGroupText,
InputGroupButton,
InputGroupTextarea,
} from "@/components/ui/input-group"<InputGroup>
<InputGroupAddon align="inline-start">
<SiSearch />
</InputGroupAddon>
<InputGroupInput placeholder="Search..." />
</InputGroup>Text Addons
With Button
With Kbd
Sizes
| Size | Description |
|---|---|
sm | Small |
md | Medium (default) |
lg | Large |
xl | Extra large |
Textarea
Line 1, Column 1
With Label
Your public-facing URL.
API Reference
InputGroupAddon
| Prop | Type | Description |
|---|---|---|
align | "inline-start" | "inline-end" | "block-start" | "block-end" | Position relative to the input |
Subcomponents
| Component | Description |
|---|---|
InputGroupInput | The text input — accepts all Input props including size |
InputGroupTextarea | A textarea variant of the input control |
InputGroupText | Plain text label inside an addon |
InputGroupButton | Button inside an addon — accepts all Button props |