Skip to content

Textarea

Markdown is supported.

<textarea class="textarea" placeholder="Tell us about yourself"></textarea>

The textarea grows with its content through field-sizing: content, so there is no resize script to wire up. min-height keeps it from collapsing when empty.

Markdown is supported.

Write at least 20 characters.

aria-invalid on the control recolours the border and ring; data-invalid on the .field carries it to the label too.

A submit control below the textarea, aligned to the trailing edge.

Override field-sizing when you want a stable box.

Set dir="rtl" on the page or on any subtree — padding, corners and positions follow the reading direction on their own. See the button page for a live example.

The same rules as any control: a real <label> with for, aria-describedby pointing at the help or error text, and aria-invalid when it is wrong.

Growing with its content is also an accessibility win — a fixed box that hides what the user typed is harder to review, especially at large text sizes.