Text Area
A text area lets a user input a longer amount of text than a standard text field. It can include all of the standard validation options supported by the text field component.
Sizes
Control the size of a textarea by using .qtm-small, .qtm-medium or .qtm-large utilities. By default, the textarea has size medium.
<div class="qtm-textarea qtm-small">
<textarea placeholder="Small"></textarea>
</div>
<div class="qtm-textarea qtm-medium">
<textarea placeholder="Medium"></textarea>
</div>
<div class="qtm-textarea qtm-large">
<textarea placeholder="Large"></textarea>
</div>
You can place textarea element inside a form field
<div class="qtm-form-field">
<label class="qtm-form-label qtm-small" for="textarea">
<span>Label</span>
<span class="qtm-counter">0</span>
</label>
<div class="qtm-textarea qtm-small">
<textarea placeholder="Small" id="textarea"></textarea>
</div>
<p class="qtm-form-caption qtm-small">This is a help text</p>
</div>
...
Disabled
Add .qtm-disabled in the element .qtm-textarea wrapper and textarea to disable these elements.
<div class="qtm-textarea qtm-disabled">
<textarea placeholder="Disabled" disabled></textarea>
</div>
Drag icon
Text areas can either be a fixed size or can be resizable with a drag icon in the bottom right corner.
By default, the drag icon should be hidden and the text area should not be resizable. You can add .qtm-drag-icon in the textarea wrapper to resize your textarea.
<div class="qtm-form-field">
<label class="qtm-form-label" for="textarea">
<span>Label</span>
<span class="qtm-counter">0</span>
</label>
<div class="qtm-textarea qtm-drag-icon">
<textarea
placeholder="Textarea should be resizable"
id="textarea"
></textarea>
</div>
<p class="qtm-form-caption">This is a help text</p>
</div>
Validation states
Error
Add .qtm-error in textarea wrapper to change textarea border color and icon color in error state.
<div class="qtm-form-field">
<label class="qtm-form-label qtm-required" for="textarea">
<span>Interests</span>
</label>
<div class="qtm-textarea qtm-error">
<textarea
placeholder="Textarea should be resizable"
id="textarea"
required
></textarea>
<i class="material-icons qtm-icon">error</i>
</div>
<p class="qtm-form-caption qtm-error">Enter at least one interest.</p>
</div>