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 (
<NTextarea
id="ta1"
label="Address"
placeholder="Enter address"
className="mb-3"
rows={3}
value={address}
onChange={e => setAddress(e.target.value)}
/>
);
};
export default Textarea;

Attributes

NameTypeDefaultDetails
labelstringOptionalLabel for the textarea.
descriptionstringOptionalDescription text below the textarea.
errorMessagestringOptionalError message to display.
multilinebooleantrueSet to true for textarea mode (uses NInput with multiline).
isDisabledbooleanfalseWhether the textarea is disabled.
valuestringOptionalControlled textarea value.
onChange(value: string) => voidOptionalCallback when textarea value changes.
classNamestring' 'You can customise textarea by passing tailwind classes.
containerClassNamestring' 'You can customise container by passing tailwind classes.
labelClassNamestring' 'You can customise label by passing tailwind classes.