Skip to main content
InputGroup gives an Input a shared border and optional leading or trailing content. Set size on the group to size both the container and its input.

Prefix and suffix

startElement and endElement accept React nodes. Prefixes and suffixes are visual content; the input’s submitted value contains only what the user enters.

Trailing action

Put labels, validation, and value handling on the field or input. Give adornment buttons their own accessible names and use type="button" when they should not submit the form. The group supports sm and md sizes and defaults to md.

Props

The reference is generated from the public component types. Native attributes, including accessible names and event handlers, are also accepted on parts that render elements.
ReactNode
Content rendered after the input, such as a suffix or a button.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
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.
"sm" | "md"
default:"md"
Visual size of the group and its input.
ReactNode
Content rendered before the input, such as a prefix or an icon.