TextAreaA multi-line text input field with support for labels and helper text.
The TextArea component provides a multi-line text input with support for labels, helper text, and error states. It can be used in both controlled and uncontrolled modes.
Install the component from your command line.
The
TextArea with optional indicator and helper text.
TextArea in error state with custom styling.
Example of TextArea in controlled mode.
TextArea with custom width specification.
(optional)
(optional)
Helper text(optional)
npm install @raystack/apsara
import { TextArea } from '@raystack/apsara/v1' <TextArea label="Label" placeholder="Enter your text here" helperText="Optional helper text" />
TextArea
component accepts the following props:
label
: Text label displayed above the textareaisOptional
: Boolean indicating if the field is optional (default: false)helperText
: Helper text displayed below the textareaerror
: Boolean to show error statewidth
: Custom width for the textarea container (string | number, default: "200px")value
: Controlled value for the textareaonChange
: Change handler for controlled usageclassName
: Additional CSS class names- All standard HTML textarea attributes
loading...
loading...
loading...
loading...
loading...