Skip to Content

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

PropTypeRequiredDefaultDescription
labelstringField label shown above the textarea
requiredbooleanfalseAdds required asterisk to label
helperTextstringTooltip text shown on info icon
errorMessagestringValidation 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")} />

Last updated on