Skip to content
SevenUI
Sign in
On this page

Input Group

Groups an input with addons, buttons, and inline text, such as icons, units, and clear or submit actions inside one field.

⌘K
@sevenui.dev

Installation

Bash

Usage

Place addons after the input in the DOM and control their visual position with the align prop. Use inline-start / inline-end for single-line inputs and block-start / block-end for textareas. Clicking an addon focuses the grouped input.

Examples

With button

Buttons inside an addon use InputGroupButton, which renders the SevenUI Button with compact sizing (xs by default, ghost variant).

Textarea

InputGroupTextarea pairs with a block-end addon for prompt-style composers. block-start works the same way for headers.

New message
12,000 tokens

API reference

InputGroup

Extends div with role="group". Wraps one control (InputGroupInput or InputGroupTextarea) plus any number of addons. Focus, disabled, and invalid styles react to the grouped control’s state.

InputGroupAddon

Extends div. Clicking it focuses the grouped input (clicks on buttons inside are ignored).

PropTypeDefault
align"inline-start" | "inline-end" | "block-start" | "block-end""inline-start"

InputGroupButton

Extends Button — all Button props apply except size, which is replaced by compact group sizes. type defaults to "button".

PropTypeDefault
variantButton variants"ghost"
size"xs" | "sm" | "icon-xs" | "icon-sm""xs"

InputGroupInput

Extends Input — all Input props apply. Renders borderless inside the group, which draws the border and focus ring.

InputGroupTextarea

Extends Textarea — all Textarea props apply. Renders borderless inside the group; the group grows to fit.

InputGroupText

Extends span. Muted inline text for prefixes, suffixes, and counters.

Was this page helpful?