Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Textarea

Write a comment with application-owned text.

Preview

Live preview

Changes apply to this preview only.

Nothing to send yet.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Sizes

From xs to xxl.

Open preview

Variants

The semantic tone of the field.

Open preview

Appearances

Outline, soft, filled and glass.

Open preview

Usage

Use a named textarea for form submission and keep character limits consistent with backend rules.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluTextareaProps

Type source
PimoluTextareaProps public API
NameTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined"md"Visual size.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined"neutral"Semantic color.
appearance"soft" | "outline" | "glass" | "filled" | undefined"outline"Visual appearance.
resize"none" | "horizontal" | "vertical" | "both" | undefined"vertical"Browser resize behavior.
labelstring | undefined—Visible label.
helperTextstring | undefined—Helper text displayed below the field.
errorMessagestring | undefined—Error message displayed instead of helper text.
invalidboolean | undefinedfalseExplicit invalid state.
fullWidthboolean | undefinedfalseStretch to the parent width.
showCountboolean | undefinedfalseDisplay the current character count.
onValueChange((value: string) => void) | undefined—Change callback receiving only the text.
containerClassNamestring | undefined—Custom class applied to the outer wrapper.
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
requiredboolean | undefinedfalseStandard React/HTML attribute.
valuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLTextAreaElement, HTMLTextAreaElement> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLTextAreaElement> | undefined—Standard React/HTML attribute.
size

"xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined

Default: "md"

Visual size.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined

Default: "neutral"

Semantic color.

appearance

"soft" | "outline" | "glass" | "filled" | undefined

Default: "outline"

Visual appearance.

resize

"none" | "horizontal" | "vertical" | "both" | undefined

Default: "vertical"

Browser resize behavior.

label

string | undefined

No default extracted.

Visible label.

helperText

string | undefined

No default extracted.

Helper text displayed below the field.

errorMessage

string | undefined

No default extracted.

Error message displayed instead of helper text.

invalid

boolean | undefined

Default: false

Explicit invalid state.

fullWidth

boolean | undefined

Default: false

Stretch to the parent width.

showCount

boolean | undefined

Default: false

Display the current character count.

onValueChange

((value: string) => void) | undefined

No default extracted.

Change callback receiving only the text.

containerClassName

string | undefined

No default extracted.

Custom class applied to the outer wrapper.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

required

boolean | undefined

Default: false

Standard React/HTML attribute.

value

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLTextAreaElement, HTMLTextAreaElement> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLTextAreaElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Associate labels, help and validation; preserve multiline editing keyboard behavior.
Read the accessibility guide →