DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.7K
Sign inGet All-Access
  1. Components
  2. Input Group
MarkdownPro 12 blocks

Shadcn Input Group

Browse 40 production-ready shadcn input-group components for text fields with prefixes, suffixes, icons, and buttons. Shadcn Input Group is compatible with Radix UI and Base UI form components and is fully aligned with Shadcn Create style options so your previews match your design tokens.

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

When to use

  • Text fields with a leading icon, prefix or suffix text, a unit or a status mark inside one border
  • Search, link and API bars that end in a copy, clear, filter, menu or send control
  • Prompt and comment composers: a text area with a toolbar row above or below the text

When not to use

  • Selects, fields and actions joined edge to edge, each keeping its own border: use the Button Group component
  • A plain text field with no icon, text or action inside its border: use the Input component
  • A complete assistant screen with a message thread above the prompt box: use the AI Chat blocks

Agent notes

  • The border turns red from aria-invalid on the control; data-invalid on Field only tints text, so set both as c-input-group-3 does
  • Addon icons and text never name the control; tie a FieldLabel to the input or textarea id as c-input-group-20 does, or give it an aria label
  • InputGroupButton defaults type to button, so pass submit when it should send the surrounding form

Third-party API docs

  • Sonner v2: API reference, docs, used by 2 of 40 examples
Markdownhttps://reui.io/components/input-group.md
MCPget_component("input-group")
Installnpx shadcn@latest add input-group
Full index for agents:llms.txtReUI MCP setup

Shadcn Input Group: Inputs with Addons

Shadcn Input Group is a flex wrapper that pairs an Shadcn Input with icons, text, or buttons. It maintains proper focus and keyboard navigation when addons sit alongside the input, and aligns with Radix UI and Base UI components.

It adds visual context like currency symbols, unit labels, or action buttons so inputs stay compact while improving clarity about what data users should enter.

ReUI lists input-group components in search flows, filters, checkout forms, and settings pages so you evaluate icon sizing, button placement, and input width next to real Shadcn Button actions and Shadcn Field groups. The sections below cover what it is, why teams use it, and integration components.

What is Shadcn Input Group?

In form terms, an input group is a container that holds an input and one or more addons (text, icons, or buttons) arranged horizontally. Shadcn Input Group manages focus and layout so the input and addons feel like one unit.

Components here show currency inputs, search fields with buttons, URL fields with copy icons, and password toggles. They help you decide addon placement and sizing before shipping inputs with rich context into production forms.

Why Use Shadcn Input Group?

Input groups reduce cognitive load by showing context right next to the field. Currency symbols, URL schemes, and action icons are all visible without extra labels or popovers. They save space in dense forms and make intent clear at a glance.

The layouts on this page combine input groups with Shadcn Field, Shadcn Button, and validation components.

Shadcn Input Group Features

  • Prefix and Suffix Addons. Text, icons, or currency symbols before or after the input so context is always visible and aligned.
  • Button Integration. Buttons sit natively inside the group for search, clear, toggle, or copy actions without needing extra spacing logic.
  • Focus Management. Focus states work correctly whether user focuses the input or an interactive addon, preventing focus loops and keeping keyboard nav smooth.
  • Icon Support. Render icons from any library (lucide-react, heroicons) as visual hints or interactive toggles next to the input.
  • Responsive Layout. Addons and input automatically adjust spacing and sizing at different breakpoints via Tailwind utilities.

Integrating with Other Components

Pair input groups with Shadcn Field to add labels and error messages. Wrap both together for a complete, accessible form field that includes context, input, and validation feedback.

Use Shadcn Button as suffixes inside input groups for search, submit, or clear actions. Combine with Shadcn Dropdown Menu when the suffix needs a menu of options.

Add icons from lucide-react or heroicons as prefix elements. Use Shadcn Tooltip on icon buttons to explain their purpose, and combine with Shadcn Input OTP for verification code groups with separators.

Form Blocks in ReUI Pro

The free examples above pair with 12 production ready form blocks in ReUI Pro, complete sections built on the same primitives and ready to copy into your app.

  • Form (12 blocks)Form layouts for settings, profiles, and data entry with validation and grouped fields.

Browse all Application blocks

Frequently Asked Questions

When should I use an input group instead of a plain input?

Use input groups when the field has prefix context (currency, URL scheme), a visible action (search, clear, copy), or a toggle (show/hide password). For simple text without addons, a plain Shadcn Input is cleaner.

How do I add a search button or icon to an input group?

Render a Shadcn Button as the suffix inside the InputGroup. Set the button variant to ghost or outline so it visually sits inside the group. Wire the button onClick handler to your search or submit logic.

Can I use input groups with validation and error messages?

Yes. Wrap the input group with Shadcn Field to add error messages and descriptions. The field handles validation display while the input group handles prefix/suffix layout.

Is an input group accessible for screen readers?

Yes, when you use semantic labels and maintain proper focus order. Pair the input group with a Shadcn Label using htmlFor, and ensure any icon buttons inside the group have accessible labels or aria-labels so screen readers understand their purpose.

How do I add a currency or unit symbol to an input?

Use InputGroupText or InputGroupAddon as the prefix or suffix, passing the symbol (like "$" or "kg"). The addon sits next to the input and doesn't receive focus, making it purely visual context.

Are ReUI input-group components different from a minimal example?

Yes. ReUI shows input groups in realistic search flows, checkout steps, and filter panels. You see button placement, focus states, and integration with Shadcn Field and Shadcn Button together, which is closer to production than a single example.
Previous31 Shadcn Input Components
Next6 Shadcn Input Otp Components

Start building with ReUI Pro today.

Every Pro block, every style, and every future addition, with one license for unlimited projects.

Get All-Access

From $249, once. Lifetime updates.

Application

  • App Shell
  • Auth
  • Card
  • Dashboard
  • Dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats2 meter cards moved here from Charts, 17 in all
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • Base
  • AdvancedAdded 2 new Data Grid Advanced blocks, 5 in all
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area ChartAdded a new Inbound Leads area chart block
  • Bar Chart
  • Composed Chart
  • Line Chart
  • Pie Chart
  • Radial Chart
  • Sankey ChartNew Sankey Chart category with 3 flow chart blocks
  • Slope ChartNew Slope Chart category with 2 rank-shift chart blocks
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity
  • AI UsageNew AI Usage category with 2 spend blocks

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • Billing
  • Bookings
  • Files
  • Inventory
  • Users
  • Digital TwinNew Digital Twin category with 2 interactive 3D blocks

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.7K

Basic input group

Input group in disabled state

Input group in invalid state

Input group with prefix icon

Input group with suffix icon

Input group with both prefix and suffix icons

Input group with prefix text addon

Input group with suffix text addon

Input group with both prefix and suffix text addons

Input group with action button addon

Input group with icon button action

Input group with dropdown menu selection

Input group with keyboard shortcut (Kbd)

Input group with tooltip action

Input group with loading spinner

Input group with block-start addon

Textarea input group with dynamic character limit

AI Chat textarea with rich toolbar actions

AI Chat interface with file and context attachments

Input group demonstrating label usage

Input group with multiple icons/buttons at the end

Input group with popover trigger addon

Input group with Sparkles icon and complex Kbd shortcut

Input group with success indicator circle

Input group with search results count

Textarea input group with action buttons

Input group wrapped in a button group with text prefixes/suffixes

Input group with a menu button (three dots) at the end

Pill-shaped input group with a category dropdown at the end

Input group with inline addons (no separating borders)

Input group with inline start and block-end addon

Member row with avatar, email and role selection

Project save interface with status and action buttons

Pill-shaped AI prompt bar with voice and audio icons

Password input with visibility toggle

API request input with method selector and send action

Order search input with status filter

Company search input with region selector

Contact search input with filter and actions menu

Share link input with visibility selector and copy action