Skip to main content

Textarea

The native <textarea> gets the same look as inputs, borders, colors, focus and validation states. You do not need any class for it, and if you want the browser default style back, add the .default class.

index.html
<label for="my-textarea" class="form-label">Tell us your story</label>
<textarea id="my-textarea" rows="4" placeholder="Once upon a time..."></textarea>

Floating label​

Floating labels work for textareas too, add the .is-textarea class next to .floating-label on the .input-wrapper:

index.html
<div class="input-wrapper is-textarea floating-label">
<textarea id="thoughts" name="thoughts" rows="4" placeholder="What do you think?"></textarea>
<label for="thoughts" class="form-label">What do you think?</label>
</div>

Sizes, colors and validation​

Textareas follow the same rules as inputs, so size setter classes, style- classes and the validation classes all work here. Read the inputs page for the details, and the customization section for the CSS variables.