Textarea Component
The Textarea component is a multi-line text input field that can be customized for various use cases.
Props
Prop | Type | Default | Description |
---|---|---|---|
label | string | undefined | Label text for the textarea |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Sets the size of the textarea |
variant | "primary" | "secondary" | "success" | "warning" | "error" | "ghost" | "primary" | Sets the color variant of the textarea |
required | boolean | false | Whether the textarea is required |
wrapperClass | string | "" | Additional CSS classes for the wrapper element |
labelClass | string | "" | Additional CSS classes for the label element |
labelTextClass | string | "" | Additional CSS classes for the label text |
sx | React.CSSProperties | {} | Custom styles to be applied to the textarea wrapper |
rows | number | 3 | Number of visible text lines |
Usage
import { Textarea } from 'knoxui-react';
<Textarea
label="Description"
placeholder="Enter your description"
size="md"
variant="primary"
rows={4}
/>