Text area

A text area allows users to enter a longer paragraph of text.

Examples

Basic

Invalid

Validated

  
Share your thoughts.

Vertically resizable

Horizontally resizable

Uncontrolled

Disabled

Read only

Auto resizing

Props

TextArea

*required
NameTypeDefaultDescription
aria-labelstringCustom flag to show that the text area requires an associated id or aria-label.
autoResizebooleanFlag to modify height based on contents.
classNamestringAdditional classes added to the text area.
isDisabledbooleanFlag to show if the text area is disabled.
isRequiredbooleanFlag to show if the text area is required.
onChange(event: React.ChangeEvent<HTMLTextAreaElement>, value: string) => voidA callback for when the text area value changes.
readOnlyVariant'default' | 'plain'Read only variant.
resizeOrientation'horizontal' | 'vertical' | 'both'Sets the orientation to limit the resize to
validated'success' | 'warning' | 'error' | 'default'Value to indicate if the text area is modified to show that validation state. If set to success, text area will be modified to indicate valid state. If set to error, text area will be modified to indicate error state.
valuestring | numberValue of the text area.

CSS variables

Expand or collapse columnSelectorVariableValue
.pf-v6-c-form-control--pf-v6-c-form-control--ColumnGap
0.5rem
.pf-v6-c-form-control--pf-v6-c-form-control--Color
(In light theme) #151515
.pf-v6-c-form-control--pf-v6-c-form-control--FontSize
0.875rem
.pf-v6-c-form-control--pf-v6-c-form-control--LineHeight
1.5
.pf-v6-c-form-control--pf-v6-c-form-control--Resize
none
.pf-v6-c-form-control--pf-v6-c-form-control--OutlineOffset
-6px
.pf-v6-c-form-control--pf-v6-c-form-control--BorderRadius
6px
.pf-v6-c-form-control--pf-v6-c-form-control--before--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--before--BorderStyle
solid
.pf-v6-c-form-control--pf-v6-c-form-control--before--BorderColor
(In light theme) #c7c7c7
.pf-v6-c-form-control--pf-v6-c-form-control--before--BorderRadius
6px
.pf-v6-c-form-control--pf-v6-c-form-control--after--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--after--BorderStyle
solid
.pf-v6-c-form-control--pf-v6-c-form-control--after--BorderColor
transparent
.pf-v6-c-form-control--pf-v6-c-form-control--after--BorderRadius
6px
.pf-v6-c-form-control--pf-v6-c-form-control--BackgroundColor
(In light theme) #ffffff
.pf-v6-c-form-control--pf-v6-c-form-control--Width
100%
.pf-v6-c-form-control--pf-v6-c-form-control--inset--base
1rem
.pf-v6-c-form-control--pf-v6-c-form-control--PaddingBlockStart
0.5rem
.pf-v6-c-form-control--pf-v6-c-form-control--PaddingBlockEnd
0.5rem
.pf-v6-c-form-control--pf-v6-c-form-control--PaddingInlineEnd
1rem
.pf-v6-c-form-control--pf-v6-c-form-control--PaddingInlineStart
1rem
.pf-v6-c-form-control--pf-v6-c-form-control--hover--after--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--hover--after--BorderColor
(In light theme) #4394e5
.pf-v6-c-form-control--pf-v6-c-form-control--m-success--hover--after--BorderColor
(In light theme) #204d00
.pf-v6-c-form-control--pf-v6-c-form-control--m-warning--hover--after--BorderColor
(In light theme) #b98412
.pf-v6-c-form-control--pf-v6-c-form-control--m-error--hover--after--BorderColor
(In light theme) #731f00
.pf-v6-c-form-control--pf-v6-c-form-control--m-expanded--after--BorderWidth
2px
.pf-v6-c-form-control--pf-v6-c-form-control--m-expanded--after--BorderColor
(In light theme) #0066cc
.pf-v6-c-form-control--pf-v6-c-form-control--m-placeholder--Color
(In light theme) #4d4d4d
.pf-v6-c-form-control--pf-v6-c-form-control--m-placeholder--child--Color
(In light theme) #151515
.pf-v6-c-form-control--pf-v6-c-form-control--m-disabled--Color
(In light theme) #4d4d4d
.pf-v6-c-form-control--pf-v6-c-form-control--m-disabled--BackgroundColor
(In light theme) #c7c7c7
.pf-v6-c-form-control--pf-v6-c-form-control--m-disabled--after--BorderColor
transparent
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--BorderColor
(In light theme) #e0e0e0
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--hover--after--BorderColor
revert
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--m-plain--BackgroundColor
transparent
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--m-plain--BorderColor
transparent
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--m-plain--inset--base
0
.pf-v6-c-form-control--pf-v6-c-form-control--m-readonly--m-plain--OutlineOffset
0
.pf-v6-c-form-control--pf-v6-c-form-control--m-success--after--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--m-success--after--BorderColor
(In light theme) #3d7317
.pf-v6-c-form-control--pf-v6-c-form-control--m-success--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control--pf-v6-c-form-control--m-warning--after--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--m-warning--after--BorderColor
(In light theme) #dca614
.pf-v6-c-form-control--pf-v6-c-form-control--m-warning--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control--pf-v6-c-form-control--m-error--after--BorderWidth
1px
.pf-v6-c-form-control--pf-v6-c-form-control--m-error--after--BorderColor
(In light theme) #b1380b
.pf-v6-c-form-control--pf-v6-c-form-control--m-error--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control--pf-v6-c-form-control--m-error--icon--width
0.875rem
.pf-v6-c-form-control--pf-v6-c-form-control--m-icon--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control--pf-v6-c-form-control--m-icon--icon--width
0.875rem
.pf-v6-c-form-control--pf-v6-c-form-control--m-icon--icon--spacer
calc(1rem / 2)
.pf-v6-c-form-control--pf-v6-c-form-control--m-icon--icon--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2) + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control--pf-v6-c-form-control__select--PaddingInlineEnd
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__select--PaddingInlineStart
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__select--m-success--m-status--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control--pf-v6-c-form-control__select--m-warning--m-status--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control--pf-v6-c-form-control__select--m-error--m-status--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--Width
100%
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--Height
auto
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--PaddingBlockStart--offset
calc(-1 * -6px)
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--PaddingBlockEnd--offset
calc(-1 * -6px)
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--PaddingInlineEnd--offset
calc(-1 * -6px)
.pf-v6-c-form-control--pf-v6-c-form-control--textarea--PaddingInlineStart--offset
calc(-1 * -6px)
.pf-v6-c-form-control--pf-v6-c-form-control__icon--Color
(In light theme) #1f1f1f
.pf-v6-c-form-control--pf-v6-c-form-control__icon--FontSize
0.875rem
.pf-v6-c-form-control--pf-v6-c-form-control__icon--m-status--Color
(In light theme) #1f1f1f
.pf-v6-c-form-control--pf-v6-c-form-control--m-success__icon--m-status--Color
(In light theme) #3d7317
.pf-v6-c-form-control--pf-v6-c-form-control--m-warning__icon--m-status--Color
(In light theme) #dca614
.pf-v6-c-form-control--pf-v6-c-form-control--m-error__icon--m-status--Color
(In light theme) #b1380b
.pf-v6-c-form-control--pf-v6-c-form-control__utilities--Gap
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__utilities--PaddingBlockStart
0.5rem
.pf-v6-c-form-control--pf-v6-c-form-control__utilities--PaddingInlineEnd
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__toggle-icon--PaddingInlineEnd
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__toggle-icon--PaddingInlineStart
1rem
.pf-v6-c-form-control--pf-v6-c-form-control__toggle-icon--Color
(In light theme) #1f1f1f
.pf-v6-c-form-control--pf-v6-c-form-control--m-disabled__toggle-icon--Color
(In light theme) #a3a3a3
.pf-v6-c-form-control.pf-m-textarea.pf-m-success--pf-v6-c-form-control--m-status--PaddingInlineEnd--offset
calc(0.875rem + 0.5rem)
.pf-v6-c-form-control.pf-m-readonly--pf-v6-c-form-control--BackgroundColor
(In light theme) #f2f2f2
.pf-v6-c-form-control.pf-m-readonly--pf-v6-c-form-control--before--BorderColor
(In light theme) #e0e0e0
.pf-v6-c-form-control.pf-m-readonly:hover--pf-v6-c-form-control--hover--after--BorderColor
revert
.pf-v6-c-form-control.pf-m-readonly:not(.pf-m-success, .pf-m-warning, .pf-m-error)--pf-v6-c-form-control--hover--after--BorderColor
revert
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--m-readonly--BackgroundColor
transparent
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--m-readonly--BorderColor
transparent
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--inset--base
0
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--before--BorderStyle
none
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--after--BorderStyle
none
.pf-v6-c-form-control.pf-m-readonly.pf-m-plain--pf-v6-c-form-control--OutlineOffset
0
.pf-v6-c-form-control.pf-m-expanded--pf-v6-c-form-control--after--BorderColor
(In light theme) #0066cc
.pf-v6-c-form-control.pf-m-expanded--pf-v6-c-form-control--after--BorderWidth
2px
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control--BackgroundColor
(In light theme) #c7c7c7
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control--Color
(In light theme) #4d4d4d
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control--m-placeholder--Color
(In light theme) #4d4d4d
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control__toggle-icon--Color
(In light theme) #a3a3a3
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control--before--BorderStyle
none
.pf-v6-c-form-control.pf-m-disabled--pf-v6-c-form-control--after--BorderStyle
none
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control--after--BorderColor
(In light theme) #b1380b
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control--hover--after--BorderColor
(In light theme) #731f00
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control__icon--m-status--Color
(In light theme) #b1380b
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control__select--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control.pf-m-error--pf-v6-c-form-control--after--BorderWidth
1px
.pf-v6-c-form-control.pf-m-error.pf-m-icon--pf-v6-c-form-control--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2) + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control--after--BorderColor
(In light theme) #3d7317
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control--hover--after--BorderColor
(In light theme) #204d00
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control__icon--m-status--Color
(In light theme) #3d7317
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control__select--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control.pf-m-success--pf-v6-c-form-control--after--BorderWidth
1px
.pf-v6-c-form-control.pf-m-success.pf-m-icon--pf-v6-c-form-control--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2) + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control--PaddingInlineEnd
calc(0.875rem + 1rem + 0.5rem)
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control--after--BorderColor
(In light theme) #dca614
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control--hover--after--BorderColor
(In light theme) #b98412
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control__icon--m-status--Color
(In light theme) #dca614
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control__select--PaddingInlineEnd
calc((0.875rem * 2) + 1rem + 1rem + 1rem)
.pf-v6-c-form-control.pf-m-warning--pf-v6-c-form-control--after--BorderWidth
1px
.pf-v6-c-form-control.pf-m-warning.pf-m-icon--pf-v6-c-form-control--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2) + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control:hover--pf-v6-c-form-control--after--BorderColor
(In light theme) #4394e5
.pf-v6-c-form-control:hover--pf-v6-c-form-control--after--BorderWidth
1px
.pf-v6-c-form-control.pf-m-icon--pf-v6-c-form-control--PaddingInlineEnd
calc(1rem + 0.875rem + calc(1rem / 2))
.pf-v6-c-form-control > select--pf-v6-c-form-control--PaddingInlineEnd
1rem
.pf-v6-c-form-control > select--pf-v6-c-form-control--PaddingInlineStart
1rem
.pf-v6-c-form-control.pf-m-placeholder > select--pf-v6-c-form-control--Color
(In light theme) #4d4d4d
.pf-v6-c-form-control.pf-m-resize-vertical--pf-v6-c-form-control--Resize
vertical
.pf-v6-c-form-control.pf-m-resize-horizontal--pf-v6-c-form-control--Resize
horizontal
.pf-v6-c-form-control.pf-m-resize-both--pf-v6-c-form-control--Resize
both
.pf-v6-c-form-control__icon.pf-m-status--pf-v6-c-form-control__icon--Color
(In light theme) #1f1f1f
select ~ .pf-v6-c-form-control__utilities--pf-v6-c-form-control__utilities--PaddingInlineEnd
0