Documentation
Form Components
Text Area

TextArea

The TextArea component is designed for multi-line text input, providing users with an area to enter larger amounts of text. It features a flexible and resizable interface that adapts to user input

Installation

Install the package

npm i @start-base/react-form-elements

Add the styles

To use the React form elements styles in a Next.js project, import the styles in your layout.tsx file.

app/layout.tsx
import "@start-base/react-form-elements/styles.css";

Import the component

import TextArea from '@start-base/react-form-elements/TextArea';

Usages

Text Area Component Label

Text Area Component Placeholder

Text Area Component Placeholder And Label

Text Area Component Resizable

Text Area Component Disable Shrink

Text Area Component Error

Error Message

API

A textarea component with optional auto-grow functionality.

NameTypeDefaultDescription
namestringName of the input
labelstringnullLabel of the input
placeholderstringnullPlaceholder of the input
disableShrinkbooleanfalsePosition the label outside of the input
valuestring or numberValue of the input
onChangefunctionCallback function that is fired when the value changes.
inputClassNamestringnullClassname for input element
labelClassNamestringnullClassname for label element
errorClassNamestringnullClassname for error element
disabledbooleanfalseDisable the input
errorstring or boolean or objectnullError message to display below the input. if value is a boolean input border will be change. Also you can pass schema validator error objects.
autoGrowbooleanfalseAuto grow textarea

Styling