--- layout: layouts/component.njk title: Teaxtarea description: Displays a form textarea or a component that looks like a textarea. toc: - label: Usage id: usage - label: Examples id: examples children: - label: Default id: example-default - label: Invalid id: example-invalid - label: Disabled id: example-disabled - label: With label id: example-with-label - label: With text id: example-with-text - label: With button id: example-with-button - label: Form id: example-form --- {% from "macros/code_preview.njk" import code_preview %} {% from "macros/code_block.njk" import code_block %} {% set code %}{% endset %} {{ code_preview("button", code, "w-full") }}

Usage

Simply add the textarea class to your <textarea> element or have a parent with the form class (read more about form). You can also set the aria-invalid attribute to true to make the textarea invalid.

{{ code_block(code) }}

Examples

Default

{{ code_preview("textarea-default", code, "w-full") }}

Invalid

{% set code %}{% endset %} {{ code_preview("textarea-invalid", code, "w-full") }}

Disabled

{% set code %}{% endset %} {{ code_preview("textarea-disabled", code, "w-full") }}

With label

{% set code %}
{% endset %} {{ code_preview("textarea-with-label", code, "w-full") }}

With text

{% set code %}

Type your message and press enter to send.

{% endset %} {{ code_preview("textarea-with-text", code, "w-full") }}

With button

{% set code %}
{% endset %} {{ code_preview("textarea-form", code, "w-full") }}

Form

{% set code %}

You can @mention other users and organizations.

{% endset %} {{ code_preview("textarea-form", code, "w-full max-w-sm") }}