Skip to content
nexubDesign System
v12.7.0

Components · Form & Input

Textarea

StableAdded v0.0.1

A multi-line text input with configurable resize behaviour, size, and validation states.

import { Textarea } from '@nexub/react';
View as Markdown

Playground

Props

size
resize
TSX
<Textarea placeholder="Enter your message…" />

Examples

Default

Sizes

Invalid

States

  • default
  • disabled
  • invalid
  • size="sm"
  • size="md"
  • size="lg"

Props

Props
PropTypeDefaultDescription
placeholderstring—Placeholder text shown when the field is empty.
disabledboolean—Disables the textarea.
invalidboolean—Applies error styling to indicate a validation failure.
rowsnumber—Initial visible row count.
resize'horizontal' | 'vertical' | 'none' | 'both''vertical'Controls resize handle visibility.
size'sm' | 'md' | 'lg''md'Controls font size and padding.
autoGrowbooleanfalse

Design tokens

Textarea reads these component tokens. Each one is unset by default and falls back to the semantic role it aliases, so nothing changes until you set it. Set one on any element to restyle every Textarea below it, and leave the roles other components share alone. See the three token tiers.

Input, Textarea, Select and Combobox triggers.

Textarea design tokens
TokenAliasesNotes
--field-bg--color-surface-container-lowest—
--field-fg--color-on-surface—
--field-border--color-outline—
--field-radius--shape-field—
CSS
/* One area of your app */
.checkout {
  --field-bg: var(--color-secondary);
}

On iOS & Android