Skip to content

Browse components

← All components

Input Group

Input with prefix and suffix addons.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/input-group.json

Preview

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.json

GitHub 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.json

Usage

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

PropTypeDefault
align"start" | "end""start"

Notes

  • Put the actual control in `InputGroupInput`, not a raw `Input`.