Input Group

Input or textarea with icons, text, buttons and menus attached inside one frame, inline or as header and footer rows, in every input size and style.

import { InputGroup } from "@plexui/ui/components/InputGroup";

For a single icon or action button inside a plain field, Input with startAdornment / endAdornment is enough. Reach for InputGroup when the field needs text prefixes and suffixes, buttons with labels, menus, or a header and footer row.

Examples

Overview

size
variant
12 results
https://
.com

Variants

Sizes

3xs
2xs
xs
sm
md
lg
xl
2xl
3xl

Align

Full name
Amount in USD

Text

$
USD
https://
.com
@company.com
280 characters left

Button

size
https://
size
Weight
Height

Spinner

Saving...

Textarea

script.js
Line 1, Column 1

API

InputGroup

PropTypeDefaultDescription
size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"Control height, on the same scale as Input (22px to 48px)
variant"outline" | "soft""outline"Visual style of the frame
pillbooleanfalseFully rounded frame, with pill buttons inside
disabledbooleanfalseDisables the control and the buttons inside
invalidbooleanfalseInvalid border; sets aria-invalid on the control
classNamestringApplied to the root <div>

Renders a <div role="group">. All other <div> attributes are forwarded. Clicking the frame, an icon or text focuses the control.

InputGroup.Input

A native <input> (type="text" by default) without its own frame. Takes every <input> attribute; disabled and aria-invalid default to the group's state.

InputGroup.Textarea

A native <textarea> with rows={3} by default. Same props and defaults as InputGroup.Input.

InputGroup.Addon

PropTypeDefaultDescription
align"inline-start" | "inline-end" | "block-start" | "block-end""inline-start"Before or after the control on its line, or a row above or below it
classNamestringApplied to the addon <div>

InputGroup.Button

Takes the Button props except size, which follows the group. color defaults to "secondary", variant to "ghost", and pill and disabled to the group's values.

InputGroup.Text

A <span> for text and icons inside an addon. All <span> attributes are forwarded.

Styling

The frame uses the Input tokens: --input-outline-border-color (and its -hover and -focus states), --input-soft-background-color, --input-soft-border-color-focus, --input-border-color-invalid, --input-text-color and --input-placeholder-text-color, which also colors addon icons and text.