Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Input Group
Input with prefix and suffix addons.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/input-group.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/input-group.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/input-group.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/input-group.
Import
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText} from "@/components/ui/input-group"example.tsx
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText,} from "@/components/ui/input-group"export function Example() { return ( <InputGroup> <InputGroupAddon> <InputGroupText>https://</InputGroupText> </InputGroupAddon> <InputGroupInput placeholder="example.com" /> <InputGroupAddon align="end"> <InputGroupButton aria-label="Go">→</InputGroupButton> </InputGroupAddon> </InputGroup> )}API Reference
InputGroupAddon
| Prop | Type | Default |
|---|---|---|
| align | "start" | "end" | "start" |
Notes
- Put the actual control in `InputGroupInput`, not a raw `Input`.