Textarea
An enhanced <textarea> element with a label, helper text tooltip, and error message display.
Import
import { Textarea } from "@phpcreation/frontend-components-react-nextjs-bundle/components/Textarea";Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
label | string | — | — | Field label shown above the textarea |
required | boolean | — | false | Adds required asterisk to label |
helperText | string | — | — | Tooltip text shown on info icon |
errorMessage | string | — | — | Validation error shown below textarea |
Plus all standard HTML <textarea> attributes.
Usage
import { Textarea } from "@phpcreation/frontend-components-react-nextjs-bundle/components/Textarea";
<Textarea
label="Notes"
placeholder="Enter any additional notes..."
rows={4}
/>
// With validation error
<Textarea
label="Description"
required
errorMessage={errors.description?.message}
{...register("description")}
/>Related
- Input
- Text Editor — for rich HTML content
- Render Form Fields
Last updated on