Skip to content

TextAreaInput

Used to enter multiple lines of text.

Please enter your bio
// Import component
import { TextAreaInput } from '@fintech-sandpit/ui/react';
// Import styles (optional). Please note that TextAreaInput is using Field component.
import '@fintech-sandpit/ui/style/components/field.css';
return (
<TextAreaInput
label="Bio"
hint="Please enter your bio"
placeholder="Enter your bio here..."
error="Invalid bio"
autoresize
/>
);
NameTypeRequiredDefaultDescription
valuestring—Controlled value of the text area
defaultValuestring—Default (uncontrolled) value of the text area
namestring—Name of the input element
orientationOrientationverticalOrientation of the text area
sizeFieldSizemdSize of the text area
labelstring—Label of the text area
hintstring—Helper text of the text area
errorstring—Error text of the text area
clearablebooleanfalseWhether the text area is clearable
requiredbooleanfalseWhether the text area is required
invalidbooleanfalseWhether the text area is invalid
readOnlybooleanfalseWhether the text area is read only
disabledbooleanfalseWhether the text area is disabled
placeholderstring—Placeholder of the text area
autoresizebooleanfalseWhether the text area should autoresize
rowsnumber—Number of rows of the text area
NameTypeDescription
onValueChange(value: string) => voidEvent handler for when the value changes
onValueClear() => voidEvent handler for when the value is cleared
type FieldSize = 'sm' | 'md' | 'lg'
type Orientation = 'horizontal' | 'vertical'