Textarea
Multiline text input styled with .re-textarea. Resizes vertically only.
<label class="re-field">
<span class="re-field__label">Message</span>
<textarea
class="re-textarea"
id="ta-basic"
name="message"
rows="4"
placeholder="Tell us…"
></textarea>
<span class="re-field__hint">Plain text. Resize vertically.</span>
</label> <div class="grid">
<label class="re-field">
<span class="re-field__label">Small</span>
<textarea class="re-textarea" data-size="sm" id="ta-sm" rows="2"></textarea>
</label>
<label class="re-field">
<span class="re-field__label">Large</span>
<textarea class="re-textarea" data-size="lg" id="ta-lg" rows="3"></textarea>
</label>
</div> States
Section titled “States” <div class="grid">
<label class="re-field">
<span class="re-field__label">Disabled</span>
<textarea class="re-textarea" id="ta-disabled" disabled>Locked</textarea>
</label>
<label class="re-field">
<span class="re-field__label">Invalid</span>
<textarea
class="re-textarea"
id="ta-invalid"
aria-invalid="true"
aria-describedby="ta-invalid-msg"
>
wrong</textarea
>
<span id="ta-invalid-msg" class="re-validation-message">Please revise.</span>
</label>
</div> Accessibility
Section titled “Accessibility”- Keyboard — fully native.
Tabmoves focus to and from the textarea; typing, caret movement, multiline newlines, and text selection all stay native..re-textareaonly styles the element — there is no extra JavaScript keyboard model. - Focus — a visible
:focus-visiblering (--re-shadow-focus, drawn withborder-color: --re-color-focus-ringplus a box-shadow) appears on keyboard focus; an invalid textarea keeps a ring in the danger color while focused. - Semantics — it stays a real
<textarea>, so its role, value, and form serialization are all native. Wrapping it in a<label class="re-field">with a.re-field__labelspan associates the label implicitly, and.re-field__hinttext should be wired to the textarea viaaria-describedby. - Notes — the danger border lights up on
[aria-invalid="true"]or the native:user-invalidpseudo-class (only after the user interacts), so error styling never fires prematurely; pointaria-describedbyat the.re-validation-messageso the message is announced. Disabled textareas render at reduced opacity with anot-allowedcursor. Horizontal resize is locked (vertical only) to prevent layout breakage. The optionaldata-autosizegrow-with-content is purely visual: nativefield-sizing: contentwhere supported, withenhanceAutosizeas a no-JS-safe fallback — neither changes the accessible value or keyboard model. See the accessibility guide.