# Textarea

Source: https://lumeo.nativ.sh/components/textarea

# Textarea

Displays a form textarea for multi-line text input.

## Installation

.NET CLI PackageReference Lumeo CLI

dotnet add package Lumeo

One-time app setup (`AddLumeo()`, CSS & JS) is covered in the [installation guide](docs/introduction).

## Usage

@using Lumeo

<Textarea />

## When to Use

-   Multi-line text input for comments, descriptions, or messages
-   Bio or "about" fields in profile and settings forms
-   Code or JSON input fields that benefit from multiple visible rows
-   Any form field where the expected input spans more than one line

For validation, label, and helper text, wrap this input in `<FormField>`. See [Form › Validation Pattern](/components/form#validation-pattern).

Preview Code

Default

Preview Code

With Binding

Character count: 0

Preview Code

Disabled

Preview Code

With Label

Your Bio

You can use markdown for formatting.

Preview Code

Custom Rows

Preview Code

Auto Resize

Preview Code

Character Counter — interactive

Show character counter

0/200

Toggle ShowCount on to see the in-field counter. MaxLength caps the input at 200 characters.

Preview Code

Resize — interactive preview

Pick a Resize value to control where the drag handle appears.

Vertical Horizontal Both None

## API Reference

### Textarea

Prop

Type

Default

Description

Value

string?

null

The current value of the textarea.

OnInput

EventCallback<ChangeEventArgs>

\-

Callback invoked on every keystroke as the value changes.

Disabled

bool

false

Disables the textarea.

AutoResize

bool

false

Automatically resize the textarea based on content.

MaxRows

int

10

Maximum number of rows when auto-resizing.

ValueChanged

EventCallback<string?>

\-

Two-way binding callback; fires when the value changes.

Resize

TextareaResize

Vertical

Controls the CSS resize handle. Values: None, Vertical, Horizontal, Both.

MaxLength

int?

null

Maximum number of characters allowed.

ShowCount

bool

false

Displays an in-field character counter (uses MaxLength when provided).

Class

string?

null

Additional CSS classes.

AdditionalAttributes

Dictionary<string, object>?

null

Additional HTML attributes (e.g. placeholder, rows).

Label

string?

null

Visible label rendered above the textarea.

HelperText

string?

null

Helper text shown beneath the textarea when valid.

ErrorText

string?

null

Error message shown beneath the textarea when invalid.

Invalid

bool

false

Marks the textarea as invalid and shows the error styling.

Required

bool

false

Marks the textarea as required for form submission.

Name

string?

null

HTML name attribute used by native form submission.

## Related Components

-   [Input](/components/input) — Single-line text input for shorter values
-   [Form](/components/form) — Wrap Textarea with labels, validation, and help text
