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,
InputGroupAddon,
InputGroupButton,
InputGroupInput,
InputGroupText,
InputGroupTextarea,
} from "@plexui/vue/components/InputGroup";

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

On Phone, an input group is the value of a row in a FieldGroup, as the Weight row of the Settings Forms: the row's label names it, its prefix, unit, menu or button sits in the row, and the row is its frame. With a prefix the group takes columns, so the value starts at the column; without one the value ends at the row's edge with its unit or menu after it, as iOS writes "72 kg". A row keeps a prefix or a unit, not both: in a column the unit would stand at the far edge, away from its value. A header becomes the row's label, a counter or status line the group's footer, and a main action the full-width button under the group. The Phone previews show rows without the size, variant and pill controls.

Examples

Overview

https://
$

Variants

Value at the end

km

Values in a column

@
€

Sizes

https://

Align

Text

plexui.com/

Button

Spinner

Textarea

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
classstringApplied to the root <div>

Renders a plain <div>. All other <div> attributes and listeners fall through, so pass role="group" with an aria-label when the group needs a name of its own. Clicking the frame, an icon or text focuses the control.

InputGroupInput

A native <input> (type="text" by default) without its own frame. Takes v-model:value (value + update:value), default-value for an uncontrolled field, and every <input> attribute; disabled and aria-invalid default to the group's state.

InputGroupTextarea

A native <textarea> with rows="3" by default. Same props and defaults as InputGroupInput.

InputGroupAddon

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
classstringApplied to the addon <div>

InputGroupButton

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.

InputGroupText

A <span> for text and icons inside an addon. All <span> attributes fall through.

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.