Textarea

Textarea is a element is often used in a form, to collect user inputs like comments or reviews

Usage

Code Editor
Copy
import { Textarea } from '@erudilabs/alma'

Component

Here preview and detail explain of Textarea component


Default

Code Editor
Copy
<Textarea
  name="experience"
  label="Tell us your experience"
  placeholder="Enter your experience here"
/>

Disabled

Code Editor
Copy
<Textarea
  name="experience_disabled"
  label="Tell us your experience"
  placeholder="Enter your experience here"
  disabled
/>

Helper

This field is using a helper text

Code Editor
Copy
<Textarea
  name="experience_helper"
  label="Tell us your experience"
  placeholder="Enter your experience here"
  helper="This field is using a helper text"
/>

Error

An unexpected error occurred. Please try again later

Code Editor
Copy
<Textarea
  name="experience_helper"
  label="Tell us your experience"
  placeholder="Enter your experience here"
  errorMessage="An unexpected error occurred. Please try again later"
/>

Props Reference

Prop
Type

testId?

string

className?

string

label?

string

name

string

rows

number

rows?

number

helper?

ReactNode

placeholder?

string

errorMessage?

string

defaultValue?

string

disabled?

boolean

onChange?

(e: ChangeEvent) => void

onBlur?

(e: FocusEvent) => void