Duolith docs

TextArea

A labelled text field of several lines, with a hint, an error and an optional character count.

Stability: experimental

Props

PropTypeDefaultMeans
labelstringThe label and accessible name.
valuestringbindable("")The text. Bind it with bind:value={name}.
placeholderstringHint text while empty.
hintstringHelp under the field.
errorstringAn error under the field.
rowsnumber4Lines tall before it scrolls.
limitnumberShows a count such as 25 / 60, red once past the limit.
disabledbooleanfalseCannot be edited or focused.

States

StateLooks like
focusedPrimary border and ring.
errorDanger border; the error text.
over limitDanger border and a red count.
disabled50% opacity.

Accessibility

roletextbox (multi-line)
nameThe label prop.
focusTab reaches it; Shift+Tab leaves it. A disabled one is skipped.
noteserror or an exceeded limit sets aria-invalid. The field is described (aria-describedby) by the error when there is one, otherwise by the hint.

Theme tokens

color.surface color.border color.primary color.danger color.ink color.muted radius.md text.label text.caption

Example

<TextArea label="Bio" limit={160} bind:value={bio} />