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.

Examples

Overview

size
variant

Variants

Sizes

Align

Text

Button

size
size

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 <div role="group">. All other <div> attributes and listeners fall through. 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.