Commit ea336680 by Oana Mangiurea Committed by GitHub

Update TextArea.mdx (#26159)

Add additional information in docs to textarea component
parent 84bf9470
...@@ -4,4 +4,26 @@ import { TextArea } from './TextArea'; ...@@ -4,4 +4,26 @@ import { TextArea } from './TextArea';
# TextArea # TextArea
Use for multi line inputs like descriptions. Use for multi line inputs like descriptions.
### Usage
```jsx
<TextArea invalid={invalid} placeholder={placeholder} cols={cols} disabled={disabled} />
```
### Usage in forms with Field
`TextArea` should be used with the `Field` component to get labels and descriptions. It should also be used for validation. See the `Field` component for more information.
```jsx
<Field label="Important information" description="This information is very important, so you really need to fill it in">
<Textarea name="importantTextarea" required />
</Field>
```
<Preview>
<Field label="Important information" description="This information is very important, so you really need to fill it in">
<Textarea name="importantTextarea" required />
</Field>
</Preview>
<Props of={TextArea} /> <Props of={TextArea} />
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment