Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

InputGroup

Invite a teammate using a composed field and adjacent action.

Preview

Live preview

Changes apply to this preview only.

@
No invite sentThe button uses type="submit" here because the form owns the action.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Addons

Static prefixes and suffixes on either inline edge.

Open preview

Buttons

InputGroupButton defaults to type=button so it never submits a surrounding form by accident.

Open preview

Sizes

Sizes only set the shared height, padding and font size; every child follows.

Open preview

Usage

Keep the input's form semantics intact when adding prefixes, suffixes or buttons.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluInputGroupProps

Type source
PimoluInputGroupProps public API
NameTypeDefaultDescription
childrenReactNode—Addons, inputs and buttons composing the field.
orientationPimoluInputGroupOrientation | undefined"horizontal"Layout direction. Defaults to "horizontal".
size"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined"md"Height and typography scale shared by the group. Defaults to "md".
disabledboolean | undefinedfalseDisables the input and every InputGroupButton of the group.
invalidboolean | undefinedfalseMarks the group and its input as invalid.
fullWidthboolean | undefinedfalseStretch the group to the width of its container.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
children

ReactNode

No default extracted.

Addons, inputs and buttons composing the field.

orientation

PimoluInputGroupOrientation | undefined

Default: "horizontal"

Layout direction. Defaults to "horizontal".

size

"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined

Default: "md"

Height and typography scale shared by the group. Defaults to "md".

disabled

boolean | undefined

Default: false

Disables the input and every InputGroupButton of the group.

invalid

boolean | undefined

Default: false

Marks the group and its input as invalid.

fullWidth

boolean | undefined

Default: false

Stretch the group to the width of its container.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onChange

ChangeEventHandler<HTMLDivElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluInputGroupAddonProps

Type source
PimoluInputGroupAddonProps public API
NameTypeDefaultDescription
alignPimoluInputGroupAddonAlign | undefined"inline-start"Edge the addon belongs to. It controls the separator and outer radii. Defaults to "inline-start".
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLSpanElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLSpanElement> | undefined—Standard React/HTML attribute.
align

PimoluInputGroupAddonAlign | undefined

Default: "inline-start"

Edge the addon belongs to. It controls the separator and outer radii. Defaults to "inline-start".

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLSpanElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLSpanElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluInputGroupTextProps

Type source
PimoluInputGroupTextProps public API
NameTypeDefaultDescription
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLSpanElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLSpanElement> | undefined—Standard React/HTML attribute.
defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLSpanElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLSpanElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluInputGroupButtonProps

Type source
PimoluInputGroupButtonProps public API
NameTypeDefaultDescription
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
type"submit" | "reset" | "button" | undefined"button"Standard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLButtonElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLButtonElement> | undefined—Standard React/HTML attribute.
disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

type

"submit" | "reset" | "button" | undefined

Default: "button"

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLButtonElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLButtonElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluInputGroupInputProps

Type source
PimoluInputGroupInputProps public API
NameTypeDefaultDescription
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
requiredboolean | undefined—Standard React/HTML attribute.
typeHTMLInputTypeAttribute | undefined"button"Standard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLInputElement> | undefined—Standard React/HTML attribute.
disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

required

boolean | undefined

No default extracted.

Standard React/HTML attribute.

type

HTMLInputTypeAttribute | undefined

Default: "button"

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLInputElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Associate the input label and give adjacent icon actions independent names.
Read the accessibility guide →