PatternFly

Input group

An input group groups multiple related controls or inputs together so they appear as one control.

Overview

Use the input group to extend form controls by adding text, buttons, selects, etc. The input group handles border overlap.

Examples

Variations





.00

@example.com




%

Documentation

Accessibility

When using the .pf-v5-c-input-group always ensure labels are used outside the input group with the .pf-v5-screen-reader class applied. You can also make use of the aria-describedby, aria-label, or aria-labelledby attributes. For more information on accessibility and forms see the form component.

Attribute
Applied to
Outcome
aria-describedby
.pf-v5-c-form-control
When using .pf-v5-c-input-group__text or .pf-v5-c-input-group__action make use of this on the input field.

Usage

Class
Applied to
Outcome
.pf-v5-c-input-group
<div>
Initiates the input group. Required
.pf-v5-c-input-group__item
<div>
Initiates the input group item.
.pf-v5-c-input-group__text
<span>
Initiates input group text. This should be used within .pf-v5-c-input-group__item to contain text.
.pf-m-plain
.pf-v5-c-input-group__item
Removes the border from the input group element.
.pf-m-box
.pf-v5-c-input-group__item
Adds appropriate styling for items that are not form controls.
.pf-m-fill
.pf-v5-c-input-group__item
Allows the input group element to stretch to fill available space.
.pf-m-disabled
.pf-v5-c-input-group__item
Adds disabled styling to match a disabled input within the input group.

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v5-c-input-group--pf-v5-c-input-group--child--ZIndex
100
.pf-v5-c-input-group--pf-v5-c-input-group__item--offset
1px
.pf-v5-c-input-group--pf-v5-c-input-group__item--MarginLeft
calc(1px * -1)
.pf-v5-c-input-group--pf-v5-c-input-group__item--BorderWidth--base
1px
.pf-v5-c-input-group--pf-v5-c-input-group__item--BorderColor--base
#f0f0f0
.pf-v5-c-input-group--pf-v5-c-input-group__item--BorderColor--accent
#8a8d90
.pf-v5-c-input-group--pf-v5-c-input-group__item--BackgroundColor
transparent
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--PaddingRight
0.5rem
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--PaddingLeft
0.5rem
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BackgroundColor
#fff
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BorderWidth
1px
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BorderTopColor
#f0f0f0
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BorderRightColor
#f0f0f0
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BorderBottomColor
#8a8d90
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-box--BorderLeftColor
#f0f0f0
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-plain--BackgroundColor
transparent
.pf-v5-c-input-group--pf-v5-c-input-group__text--FontSize
1rem
.pf-v5-c-input-group--pf-v5-c-input-group__text--Color
#6a6e73
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-disabled__text--Color
#6a6e73
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-disabled--BorderBottomColor
transparent
.pf-v5-c-input-group--pf-v5-c-input-group__item--m-disabled--BackgroundColor
#f0f0f0
.pf-v5-c-input-group__item.pf-m-box--pf-v5-c-input-group__item--BackgroundColor
#fff
.pf-v5-c-input-group__item.pf-m-plain--pf-v5-c-input-group__item--MarginLeft
0
.pf-v5-c-input-group__item.pf-m-plain--pf-v5-c-input-group__item--BackgroundColor
transparent
.pf-v5-c-input-group__item.pf-m-disabled--pf-v5-c-input-group__item--BackgroundColor
#f0f0f0
.pf-v5-c-input-group__item.pf-m-disabled--pf-v5-c-input-group__item--m-box--BorderBottomColor
transparent
.pf-v5-c-input-group__item.pf-m-disabled--pf-v5-c-input-group__text--Color
#6a6e73

View source on GitHub