Text input group

A text input group is a more custom, flexible, and composable version of a text input that includes elements like icons and buttons.

Examples

Basic

Disabled

Utilities and icon

Filters

  • chip one
  • chip two
  • chip three

Props

TextInputGroup

*required
NameTypeDefaultDescription
childrenReact.ReactNodeContent rendered inside the text input group
classNamestringAdditional classes applied to the text input group container
isDisabledbooleanAdds disabled styling and a disabled context value which text input group main hooks into for the input itself
isPlainbooleanFlag to indicate the toggle has no border or background

TextInputGroupMain

*required
NameTypeDefaultDescription
aria-activedescendantstringThe id of the active element. Required if role has a value of "combobox", and focus should remain on the input.
aria-controlsstringThe id of the element(s) controlled by the input. Required if role has a value of "combobox".
aria-labelstringAccessibility label for the input
childrenReact.ReactNodeContent rendered inside the text input group main div
classNamestringAdditional classes applied to the text input group main container
hintstringSuggestion that will show up like a placeholder even with text in the input
iconReact.ReactNodeIcon to be shown on the left side of the text input group main container
inputIdstringThe id of the input element
isExpandedbooleanFlag for whether an associated element controlled by the input is visible. Required if role has a value of "combobox".
namestringName for the input
onBlur(event?: any) => voidCallback for when focus is lost on the input field
onChange(event: React.FormEvent<HTMLInputElement>, value: string) => voidCallback for when there is a change in the input field
onFocus(event?: any) => voidCallback for when the input field is focused
placeholderstringPlaceholder value for the input
rolestringDetermines the accessible role of the input.
type| 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url'Type that the input accepts.
valuestring | numberValue for the input

TextInputGroupUtilities

*required
NameTypeDefaultDescription
childrenReact.ReactNodeContent rendered inside the text input group utilities div
classNamestringAdditional classes applied to the text input group utilities container

CSS variables

Expand or collapse columnSelectorVariableValue