Components

Textarea

Multi-line text input with error state support.

Category: Form / Standalone

Import

import { Textarea } from "@hareru/ui"

Exports

NameTypeDescription
TextareaComponentMain textarea component
TextareaPropsTypeProps interface

Types

export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
  error?: boolean
}

Key Props

PropTypeDefaultDescription
errorbooleanfalseApplies error styling (hui-textarea--error)
rowsnumberNative rows attribute to control visible height

Accessibility

  • Keyboard:
    • Standard text input keyboard interactions

Usage

import { Textarea } from "@hareru/ui"

// Basic usage
<Textarea placeholder="Enter your message..." />

// Error state
<Textarea error placeholder="Error state" />

// Controlled with row count
<Textarea
  rows={6}
  value={value}
  onChange={(e) => setValue(e.target.value)}
  placeholder="Write your bio..."
/>

Notes

  • All native HTMLTextAreaElement attributes are forwarded.
  • The error prop only applies visual styling. Pair with FormField for full accessible error handling including aria-invalid and aria-describedby.

On this page