Components
Textarea
Multi-line text input with error state support.
Category: Form / Standalone
Import
import { Textarea } from "@hareru/ui"Exports
| Name | Type | Description |
|---|---|---|
Textarea | Component | Main textarea component |
TextareaProps | Type | Props interface |
Types
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
error?: boolean
}Key Props
| Prop | Type | Default | Description |
|---|---|---|---|
error | boolean | false | Applies error styling (hui-textarea--error) |
rows | number | — | Native 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
HTMLTextAreaElementattributes are forwarded. - The
errorprop only applies visual styling. Pair withFormFieldfor full accessible error handling includingaria-invalidandaria-describedby.