Skip to content

TextArea

Use TextArea to collect long-form text, such as a gift message or delivery instructions. The field grows to fit its content, shows a floating label, and displays an error message when you provide one.

The SDK TextArea showing a multi-line text field with a value.
import { TextArea } from '/@dropins/tools/components.js';
PropTypeReq?Description
idstringNoID for the textarea field. TextArea generates its own internal ID for the floating label’s for attribute regardless of this prop, so setting a custom id breaks the label-to-field association. If you need a custom id, also pass aria-label so the field still has an accessible name.
namestringNoName attribute for the input, used in form submissions. Defaults to an empty string.
disabledbooleanNoDisable the textarea field.
errorMessagestringNoError message shown below the field.

TextArea also accepts standard textarea HTML attributes (for example, value, label, onChange, and onBlur). The label value doubles as the field’s floating label and placeholder.

import { TextArea, provider } from '/@dropins/tools/components.js';
await provider.render(TextArea, {
name: 'message',
label: 'Your Message',
})(document.querySelector('.textarea'));