Overview
The text area form field can be resized by the end user, and is designed as a free text input field. It is only for use within the form component. Similar to the other form fields, it can be in either a default, focus, disabled or error state.
Examples
Static variation
<div class="textarea">
<label for="formTextarea-1" class="textarea__label">Textarea input</label>
<textarea name="" id="formTextarea-1" class="textarea__field" cols="30" rows="5"></textarea>
<div class="form__error-message">
This field is required
</div>
</div>
<div class="textarea">
<label for="formTextarea-2" class="textarea__label is-invalid">Textarea input</label>
<textarea name="" id="formTextarea-2" class="textarea__field is-invalid" cols="30" rows="5" required></textarea>
<div class="form__error-message is-visible">
This field is required
</div>
</div>
Usage guidelines
Dos | Donts |
---|---|
|
|
|
Implementation guidelines
Name | Attribute | Description |
---|---|---|
Required |
required
|
Requires a value to be selected - cannot be left blank. Apply to the textarea element.
|