Text area
A text area lets users enter long form text which spans over multiple lines.Installation
| Install | yarn add @atlaskit/textarea |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/textarea, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
| Description | Controls the appearance of the field. Subtle shows styling on hover. None prevents all field styling. Take care when using the none appearance as this doesn't include accessible interactions. |
|---|---|
| Type | "standard" | "subtle" | "none" |
| Description | You should not be accessing this prop under any circumstances.
It is provided by |
|---|---|
| Type | (payload: AnalyticsEventPayload) => UIAnalyticsEvent |
| Description | The default value of the text area. |
|---|---|
| Type | string |
| Description | Sets whether the field should expand to fill available horizontal space. |
|---|---|
| Type | boolean |
| Description | Sets the field as uneditable, with a changed hover state, and prevents it from showing in the focus order. Wherever possible, prefer using validation and error messaging over disabled fields for a more accessible experience. |
|---|---|
| Type | boolean |
| Description | Sets styling to indicate that the input is invalid. |
|---|---|
| Type | boolean |
| Description | Sets the content text value to monospace. |
|---|---|
| Type | boolean |
| Description | If true, prevents the value of the input from being edited. |
|---|---|
| Type | boolean |
| Description | Sets whether the field is required for form that the field is part of. |
|---|---|
| Type | boolean |
| Description | The maximum height of the text area. |
|---|---|
| Type | string |
| Description | The minimum number of rows of text to display. |
|---|---|
| Type | number |
| Description | Name of the input form control. |
|---|---|
| Type | string |
| Description | Handler to be called when the input is blurred. |
|---|---|
| Type | (event: FocusEvent<HTMLTextAreaElement, Element>) => void |
| Description | Handler to be called when the input changes. |
|---|---|
| Type | (event: ChangeEvent<HTMLTextAreaElement>) => void |
| Description | Handler to be called when the input is focused. |
|---|---|
| Type | (event: FocusEvent<HTMLTextAreaElement, Element>) => void |
| Description | The placeholder text within the text area. Don't use placeholder text to provide instructions as it disappears on data entry. |
|---|---|
| Type | string |
| Description | No description. |
|---|---|
| Type | ((instance: HTMLTextAreaElement) => void) | RefObject<HTMLTextAreaElement> |
| Description | Enables resizing of the text area. The default setting is |
|---|---|
| Type | "none" | "auto" | "vertical" | "horizontal" | "smart" |
| Description | Enables native spell check on the |
|---|---|
| Type | boolean |
| Description | A |
|---|---|
| Type | string |
| Description | The theme function |
|---|---|
| Type | any |
| Description | The value of the text area. |
|---|---|
| Type | string |