Skip to content
Harness Design System Harness Design System Harness Design System

Textarea

beta

The Textarea component is used to create a multi-line text input field.

Usage

import { Textarea } from '@harnessio/ui/components'
//...
return (
<Textarea
label="Textarea label"
placeholder="Placeholder"
name="textarea-name"
onChange={handleChange}
/>
)

API Reference

The Textarea can be used either controlled or uncontrolled. When controlled, the Textarea will use the value prop as its value and call the onChange callback whenever the value changes. When uncontrolled, the Textarea will use the defaultValue prop as its initial value and will call onChange when its value changes. The Textarea also supports all attributes of the textarea HTML element.

PropRequiredDefaultType
namefalsestring
idfalsestring
valuefalsestring
onChangefalse(value: string) => void
labelfalsestring
captionfalsestring
errorfalsestring
optionalfalsefalseboolean
resizablefalsefalseboolean
disabledfalsefalseboolean