Search documentation

Search the documentation and open a page.

Displays an input field with additional elements such as icons, buttons, or text.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/input-group

Composition

[appInputGroup] ├── [appInputGroupAddon] (optional) │ ├── [appInputGroupText] │ └── [appInputGroupButton] (optional) └── input[appInputGroupInput] | textarea[appInputGroupTextarea]

Examples

Alignment

Loading...

Button

Loading...

Character Count

Loading...

Default

Loading...

Disabled

Loading...

Dividers

Loading...
Loading...

Icon

Loading...

Loading

Loading...

Sizes

Loading...

Text

Loading...

API Reference

Apply these directives to native elements. Native attributes and events remain available on their host elements. InputGroupImports contains all six directives listed below.

[appInputGroup]

Adds the input group container styles and role="group" to the host element.

Inputs

InputTypeDefaultDescription
size"default" | "lg" | "xl""default"Controls the size of the complete input group.

[appInputGroupAddon]

Adds an optional leading, trailing, top, or bottom addon and sets role="group" on its host.

Inputs

InputTypeDefaultDescription
align"inline-start" | "inline-end" | "block-start" | "block-end""inline-start"Positions the addon within the input group.

[appInputGroupButton]

Styles its host as a button and sets the native type attribute to "button".

Inputs

InputTypeDefaultDescription
variant"default" | "destructive" | "ghost" | "link" | "outline" | "secondary""ghost"Controls the button's visual style.
size"xs" | "sm" | "icon-xs" | "icon-sm" | "text""xs"Controls the button size within the input group.

[appInputGroupText]

Styles text placed inside an addon. It has no public inputs or outputs.

input[appInputGroupInput]

Styles a native <input> as the group's control. Use native input attributes, properties, and events to configure it.

textarea[appInputGroupTextarea]

Styles a native <textarea> as the group's control. Use native textarea attributes, properties, and events to configure it.