Design System React

AlphaThis a work in progress. Your input will help us to improve it. Report issues or raise questions on GitHub.

Textarea

JSX for this example
<React.Fragment />

Textarea with character count

JSX for this example
<React.Fragment />

Textarea configuration

Textarea components can use the following props:

className (optional)
A CSS class name to pass to the component.
errorMessage (optional)
Text to use for an error message.
hasError (optional)
Whether the field is in an error state. Boolean.
hintText (optional)
Text to use for a textarea's hint text.
id
Value to use for the id attribute of the textarea element.
label
Text to use for the textarea's associated label.
name (optional)
Value to use for the name attribute of the textarea element.
onBlur (optional)
Function to fire in response to a blur event.
onChange (optional)
Function to fire in response to a change event.
placeholder (optional)
Value to use for the placeholder attribute of the textarea element.
rows (optional)
Value to use for the rows attribute of the textarea element. Default is 4.
value (optional)
The default value of the textarea element.

Character count configuration

Use these additional props for a textarea with a character count:

countThreshold (optional)
Percentage threshold to show the character count at.
maxlength
Maximum number of characters permitted.