<Textarea
label="Label"
description="Description"
hint="Hint text"
error="Error message"
autoHeight={false}
disableResize={false}
maxLength={100}
maxRows={10}
minRows={3}
showCounter={true}
required={false}
moreInfo="More info"
errorAriaLive="assertive"
onChange={(e, state) => console.log(state.value)}
/>
Textarea Props
In addition to the props listed below, the Textarea component can accept any valid HTML textarea props. Note that the onChange prop has an additional state parameter the HTML textarea props does not.onChange
(e: ChangeEvent, state?: TextareaState) => void;
required
The state parameter includes value: string
error
string | ReactElement | boolean
errorAriaLive
"assertive" | "polite" | "off"
default:"assertive"
Use "polite" for live and instant validation.
Passed as the children of the rendered label element.
Passed to the underlying Label component.
Required if showCounter is true.
Only valid if autoHeight is true.
Only valid if autoHeight is true.
Text added to info icon tooltip in the label.