Textarea

<Textarea>TailwindCSS Modules

A multiline text input component. Includes built-in support for labels, hints, validation errors, and character counters.

InstallationColoxo CLI
npx coloxo add textarea --style coloxo-css
ES Module ImportPlayground / npm package
import { Textarea } from '@coloxo/ui';

Design Tokens:

--cx-focus-ring: #2348FF--cx-error-500: #EF4444--cx-border-primary: #E2E8F0--cx-radius-md: 8px

1. Variant Matrix

Textareas support various states and configurations out of the box.

DefaultWith HintWith Character CountInvalid State
States

This is a hint text to help user.

10/80
10/80

2. Interactive Props Configurator

Show Hint

Show Character Count

Invalid / Error State

Disabled State

Visual Render Canvas

This is a hint text to help user.

tsx
<Textarea  label="Manager notes"  placeholder="Add context"  rows={4}  hint="This is a hint text to help user."/>

3. Dark theme

Textareas invert gracefully in dark mode, maintaining focus visibility and error legibility.

This is a hint text to help user.

10/80

4. Enterprise layout compositions

Textareas are often placed alongside other form controls in settings pages or feedback forms.

Project Setup

0/200

Describe what this project aims to achieve.

Save Changes

Accessibility

Character Count Alerts

When `showCount` is enabled, the counter is wrapped in an `aria-live="polite"` region, which subtly announces updates to screen readers without interrupting the user's flow.

Aria DescribedBy

Just like the Input component, the Textarea automatically links to both its hint and error messages via `aria-describedby`.

Props

NameTypeDefaultDescription
labelReactNode—Form field label text.
hintReactNode—Helper text displayed below the field.
errorReactNode—Validation message; invalid border + trailing error icon.
resize"none" | "vertical" | "horizontal" | "both"verticalResize behavior.
showCountboolean—Show current/max length when maxLength is set.
maxLengthnumber—Native max length; enables count display with showCount.
disabledboolean—Disabled surface.