Textarea
A Textarea component allows users to enter multi-line text. Built on top of heroui-native.
Demo
Demo Coming Soon
Textarea examples will be available soon.
Usage
import { useState } from 'react';import { NTextarea } from '@nayan-ui/react';const Textarea = () => {const [address, setAddress] = useState('Bangalore, India');return (<NTextareaid="ta1"label="Address"placeholder="Enter address"className="mb-3"rows={3}value={address}onChange={e => setAddress(e.target.value)}/>);};export default Textarea;
Attributes
| Name | Type | Default | Details |
|---|---|---|---|
| label | string | Optional | Label for the textarea. |
| description | string | Optional | Description text below the textarea. |
| errorMessage | string | Optional | Error message to display. |
| multiline | boolean | true | Set to true for textarea mode (uses NInput with multiline). |
| isDisabled | boolean | false | Whether the textarea is disabled. |
| value | string | Optional | Controlled textarea value. |
| onChange | (value: string) => void | Optional | Callback when textarea value changes. |
| className | string | ' ' | You can customise textarea by passing tailwind classes. |
| containerClassName | string | ' ' | You can customise container by passing tailwind classes. |
| labelClassName | string | ' ' | You can customise label by passing tailwind classes. |