Skip to content
SENVENLI UI

Text area

A multi-line text input that grows with its content, with an optional character count.
Longer text
import { TextArea } from "@senvenli/react/form";

Examples

With a limit

`maxLength` shows the count; text past it is kept and marks the field invalid.

Invalid

The error says what is missing.

Guidelines

When to use it

  • Longer free text: a message, notes, a description.

Use something else when

  • The answer fits on one line. Input

Accessibility

Built in

  • The character count is announced politely as it changes.
  • Required fields show "Fill in this field." after a blur or a submit; your own errorMessage replaces it.

You provide

  • A visible label.

API reference

TextArea

labelRequired
React.ReactNode
isLabelHidden
boolean

Keeps the label for screen readers only: it still names the field, but takes no space. For a field whose purpose the surface already shows, such as a chat reply box under its conversation. A visible label stays the default.

description
React.ReactNode
errorMessage
React.ReactNode
isOptional
boolean
placeholder
string
maxLength
number

Shows the counter. The user may type or paste past it; the field turns invalid and blocks on submit, so pasted text is never cut silently.

showCounter
boolean

Shows the "89 / 500" count under the field; true by default whenever maxLength is set. false hides only the visible count: the limit still marks the field invalid past maxLength, and screen readers still hear when it is exceeded.

requiredValidation
RequiredValidation

Who says an empty required field is missing: field (default) or app. With app a DS Form's onSubmit runs with the field empty, and the app's own error must clear on change. See {@link RequiredValidation} for the whole contract.

radius
ComponentRadius

Corner radius: none, small, medium (the design), large or full. The provider's default otherwise.

Also takes 84 standard DOM and ARIA attributes (id, aria-label, event handlers…).