Forms

Textarea

A textarea is a multi-line input field that enables users to enter longer blocks of text, such as comments, messages, or descriptions.

Basic example

Default

Basic textarea example.

Label and placeholder

Basic textarea with placeholder.

Types

Default

Floating label

The `textarea-floating` style is used to define the appearance of the textarea, while the `textarea-floating-label` is the container for the label text.

Size

Default

Add responsive class `textarea-{size}` where `{size} = xs|sm|md|lg|xl` for textarea of different sizes.

Floating label

Add responsive class `select-{size}` where `{size} = xs|sm|md|lg|xl` for select of different sizes.

Textarea group

Leading icons

Add a leading icon inside textarea.

Tailing icons

Add a tailing icon inside textarea.

Validation states

Success state

Success state can be show using `is-valid` class.

Helper text
Helper text

Error state

Error state can be show using `is-invalid` class.

Helper text
Helper text

Illustrations

Hidden label

`label` elements hidden using the .sr-only class.

Disable

Add the `disabled` boolean attribute on an textarea to remove pointer events, and prevent focusing.

Readonly

Add the `readonly` boolean attribute on an textarea to prevent modification of the textarea value.

Helper text

Basic textarea example with helper text and hints.

Helper text
Helper text
Class referenceThe component, style, color, state, size and modifier classes available for this component.
ClassTypeDescription
textareacomponentBasic textarea field.
textarea-floatingcomponentFloating textarea field.
textarea-floating-labelpartFloats the label to the top.
label-textpartFor label.
helper-textpartFor helper text.
is-validstateAdds success style to the input.
is-invalidstateAdds error style to the input.
textarea-xssizeExtra small Textarea size.
textarea-smsizeSmaller Textarea size.
textarea-mdsizeMedium(default) Textarea size.
textarea-lgsizeLarger Textarea size.
textarea-xlsizeExtra large Textarea size.