The Textarea
component provides a multiline text input field that includes an optional character limit feature. It is designed for entering larger amounts of text, with the ability to track and display remaining characters.
import React from 'react';
import { Textarea } from '~/ui/components/Form';
export default function App() {
return (
<div>
<Textarea
placeholder="Enter your message"
name="message"
characterLimit={100}
/>
</div>
);
}
120
Name | Type | Default | Description |
---|---|---|---|
className | string | undefined | Additional CSS classes to be applied to the textarea component |
characterLimit | number | undefined | Optional limit on the number of characters a user can input |
onChange | function | undefined | Handler for changes to the textarea's value, including character count updates |
placeholder | string | undefined | A hint to the user about what to type in the textarea |
value | string | undefined | Specifies the value of the textarea |
disabled | boolean | false | Indicates whether the textarea is disabled |