Composables
ComposableBuilt onInput

Input Group

Combine input fields with buttons, icons, or text for enhanced functionality

The input group wraps an input or textarea together with icons, text, or buttons as a single bordered control. Use it for search fields with a leading icon, password fields with a visibility toggle, inputs with unit suffixes, or any field that needs inline addons.

Preview

12 results
https://
52% used

Installation

Usage

Composition

Place one or more InputGroupAddon blocks alongside the input and position each with its align prop.

Examples

Password Toggle

Use InputGroupButton to create a visibility toggle for password fields.

With Suffix

Add unit labels or currency codes using align="inline-end".

USD
kg

Keyboard Shortcut

Display keyboard shortcuts using the Kbd component inside an addon.

⌘K

Validation State

Use aria-invalid="true" on the input to show error styling on the group.

Elevated Variant

Use variant="elevated" on InputGroup so the group reads correctly on a Card, Dialog, or popover surface. The inner input is transparent, so the container's variant controls the whole group. See the Surfaces docs.

On a Card surface
Use variant="elevated" on the InputGroup when it sits inside a Card, Dialog, or popover.
ValueDescription
defaultOpaque bg-input container for standard backgrounds.
elevatedTranslucent bg-input-elevated container for layered surfaces.

API Reference

The Input Group is a custom layout component for combining inputs with addons. All props listed below are custom to this implementation.

Props

InputGroup

Container that combines inputs with addons. Renders a div with role="group". Accepts standard div props.

Prop

InputGroupAddon

Container for icons, text, or buttons positioned relative to the input.

Prop

InputGroupButton

Styled button for use inside addons. Wraps the Button component with size variants optimized for input groups. Accepts all Button props except size.

Prop

InputGroupText

Styled text container for labels or static content inside addons. Renders a span. Accepts standard span props.

InputGroupInput

Styled input for use inside the group. Wraps the Input component with transparent styling. Accepts all Input props.

InputGroupTextarea

Styled textarea for multi-line inputs. Wraps the Textarea component with transparent styling. Accepts all Textarea props.