StellarUI

<stellar-text-area>

Properties

Preview

Markup

Copy
<stellar-text-area
  label="Notes"
  description="Use this for longer freeform content."
  placeholder="Write a note..."
>
  Draft release notes
</stellar-text-area>

API

Complete props, events, slots, and implementation notes for the shipped text area.

Props

PropTypeDefaultNotes
toneneutral | primary | secondary | tertiary | errorneutral
appearancedefault | ghostdefault
sizexs | sm | md | lg | xlmd
disabledbooleanfalse
labelstring''
descriptionstring''
errorstring''
valuestring''
placeholderstring''

Events

EventSourceNotes
input / changenativeBubbled from the inner native <textarea>.
focus / blurnativeUse normal DOM listeners on the custom element.
custom eventsnonestellar-text-area does not emit custom events.

Slots

SlotNotes
labelOptional content above the field. Overrides the label prop when present.
descriptionOptional helper content below the field. Overrides the description prop when present.
errorOptional validation message below the field. It replaces description while the inner control is invalid.

Notes

  • The public tag is `stellar-text-area`, backed by a real native `<textarea>` inside a light wrapper.
  • The shipped API stays small: `tone`, `appearance`, `size`, `disabled`, `label`, `description`, `value`, and `placeholder`.
  • `stellar-text-area` uses `mode: 'open'`, so it can read exported `stellar.css` tokens directly while keeping its own field styling local.
  • `required`, `aria-invalid`, and `custom-validity` forward to the inner native textarea for validation-sensitive flows.
  • The host exposes `setCustomValidity()`, `checkValidity()`, `reportValidity()`, `validity`, `validationMessage`, and `willValidate`, so app code can use native-like validity APIs on the custom element.
  • For Datastar, prefer `data-attr:custom-validity="..."` on the custom element host instead of the Pro-only `data-custom-validity` attribute.
  • The visual baseline follows the shipped textarea sizing, ghost treatment, and colored border/focus behavior with direct Stellar token mapping.
  • The component intentionally stays close to native textarea behavior instead of inventing icon slots or extra helper structure.