Skip to content

Input Group

Free

One frame around an input or a text area and the parts next to it: icons, text, key hints, and buttons.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Use InputGroupInput or InputGroupTextarea in the group. InputGroupAddon align places each add-on.

project-search.tsx

InputGroup

<div>
PropTypeDefaultDescription
rounded"default""full""default"
size"default""lg""sm""xs""default"
variant"dashed""default""default"
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

InputGroupAddon

<div>
PropTypeDefaultDescription
align"block-end""block-start""inline-end""inline-start""inline-start"
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

InputGroupText

<span>
PropTypeDefaultDescription
classNamestring—
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

InputGroupButton

<button>
PropTypeDefaultDescription
rounded"default""full"—
variant"dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary"—
classNamestring—
size"icon-sm""icon-xs""sm""xs"—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether the button should be focusable when disabled.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

InputGroupInput

<input>
PropTypeDefaultDescription
classNamestring—
rounded"default""full"—
size"default""lg""sm""xs"—
From Base UIInputBase UI docs
onValueChange—Callback fired when the value changes. Use when controlled.
defaultValuestring | number | readonly string[]—The default value of the input. Use when uncontrolled.
valuestring | number | readonly string[]—The value of the input. Use when controlled.
...props<input> attributes—Every other attribute goes to the <input>, with a ref.

InputGroupTextarea

<input>
PropTypeDefaultDescription
classNamestring—
size"default""lg""sm"—The padding of the box: sm, default, or lg (the height follows the text).
From Base UIField.ControlBase UI docs
onValueChange—Callback fired when the value changes. Use when controlled.
...props<input> attributes—Every other attribute goes to the <input>, with a ref.
  • Use it to put icons, text, keys, or buttons inside the frame of a field.
  • Use InputGroupAddon align (inline-start, inline-end, block-start, block-end) to place an add-on.
  • Use InputGroupTextarea with a block-end add-on for a composer with a toolbar.
  • Use rounded="full" for a one-line search field.
  • For a field with no add-on, use an Input.
  • For a list of options that opens under the field, use a Combobox.
TabMoves focus to the control, then to each button in an add-on.

The focus ring goes around the whole frame, so it also holds the add-ons.

A press on an add-on focuses the control. A press on a button or a link in the add-on stays on that child.

An icon add-on has no name. Name the input with a FieldLabel or an aria-label.

Built with

Installs with Input Group

  1. AddedInput Group, with Button, Input, Textarea.
Open the release