Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Input Group for React and Tailwind

Group input elements together.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/input-group.json

Usage

import { SearchIcon } from "lucide-react";
import {
  InputGroup,
  InputGroupAddon,
  InputGroupInput,
} from "@/components/ui/input-group";
<InputGroup className="max-w-64">
  <InputGroupInput placeholder="Search..." />
  <InputGroupAddon>
    <SearchIcon />
  </InputGroupAddon>
</InputGroup>

Accessibility

KeyDescription
Enter
Activate the focused control.
Space
Activate the focused control.

Demos

Align Block End

Align Block Start

Align Inline End

Align Inline Start

Disabled

Input Group

Invalid

Password Strength Checker

Size Lg

Size Md

Size Sm

With Badge

With Button

With Inner Label

With Keyboard Shortcut

With Menu

With Number Input

With Spinner

With Textarea

With Tooltip

API Reference

InputGroup

div

PropType
AttributeType
CSS variableType

InputGroupAddon

div

PropType
AttributeType
CSS variableType

InputGroupButton

PropType
AttributeType

InputGroupText

span

PropType
AttributeType

InputGroupInput

PropType
AttributeType

InputGroupTextarea

PropType
AttributeType