- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Input Group — All Variants × States (Sm)
Default
Password
Search
Phone Number
Website
Amount
Date
Card Number
Domain
Permission
Input Group — All Variants (XS Size)
Input Group — All Variants (SM Size)
Input Group — All Variants (MD Size)
Password Strength Component
Your password must include:
Use at least 8 characters.
Mix letters, numbers, and symbols.
Avoid common words or patterns.
Your password must include:
Use at least 8 characters.
Mix letters, numbers, and symbols.
Avoid common words or patterns.
Your password must include:
Use at least 8 characters.
Mix letters, numbers, and symbols.
Avoid common words or patterns.
Composition — Provider + Shell
"use client"
import * as React from "react"Installation
pnpm dlx createui@latest add input-group
Usage
import {
InputGroup,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
InputGroupTextarea,
} from "@/components/ui/input-group"<InputGroup>
<InputGroupInput placeholder="Search..." />
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>
</InputGroup>Align
Position the addon relative to the input.
For proper focus management, InputGroupAddon should always be placed after
InputGroupInput or InputGroupTextarea in the DOM.
inline-start
Position the addon at the start of the input. This is the default.
Component input-group-inline-start not found in registry.
inline-end
Position the addon at the end of the input.
Component input-group-inline-end not found in registry.
block-start
Position the addon above the input.
Component input-group-block-start not found in registry.
block-end
Position the addon below the input.
Component input-group-block-end not found in registry.
Examples
Icon
Component input-group-icon not found in registry.
Text
Component input-group-text not found in registry.
Button
Component input-group-button not found in registry.
Kbd
Component input-group-kbd not found in registry.
Dropdown
Component input-group-dropdown not found in registry.
Spinner
Component input-group-spinner not found in registry.
Textarea
Component input-group-textarea not found in registry.
Custom Input
Add the data-slot="input-group-control" attribute to your custom input for automatic focus state handling.
Here's an example of a custom resizable textarea from a third-party library.
Component input-group-custom not found in registry.
API Reference
InputGroup
The main component that wraps inputs and addons.
| Prop | Type | Default |
|---|---|---|
className | string |
<InputGroup>
<InputGroupInput />
<InputGroupAddon />
</InputGroup>InputGroupAddon
Displays icons, text, buttons, or other content alongside inputs.
For proper focus navigation, the InputGroupAddon component should be placed
after the input.
| Prop | Type | Default |
|---|---|---|
className | string |
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>The InputGroupAddon component can have multiple InputGroupButton components and icons.
<InputGroupAddon>
<InputGroupButton>Button</InputGroupButton>
<InputGroupButton>Button</InputGroupButton>
</InputGroupAddon>InputGroupButton
Displays buttons within input groups.
| Prop | Type | Default |
|---|---|---|
size | "xs" | "icon-xs" | "sm" | "icon-sm" | "xs" |
variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "ghost" |
className | string |
<InputGroupButton>Button</InputGroupButton>
<InputGroupButton size="icon-xs" aria-label="Copy">
<CopyIcon />
</InputGroupButton>InputGroupInput
Replacement for <Input /> when building input groups. This component has the input group styles pre-applied and uses the unified data-slot="input-group-control" for focus state handling.
| Prop | Type | Default |
|---|---|---|
className | string |
All other props are passed through to the underlying <Input /> component.
<InputGroup>
<InputGroupInput placeholder="Enter text..." />
<InputGroupAddon>
<SearchIcon />
</InputGroupAddon>
</InputGroup>InputGroupTextarea
Replacement for <Textarea /> when building input groups. This component has the textarea group styles pre-applied and uses the unified data-slot="input-group-control" for focus state handling.
| Prop | Type | Default |
|---|---|---|
className | string |
All other props are passed through to the underlying <Textarea /> component.
<InputGroup>
<InputGroupTextarea placeholder="Enter message..." />
<InputGroupAddon>
<InputGroupButton>Send</InputGroupButton>
</InputGroupAddon>
</InputGroup>