Skip to main content

Textarea

Allow users to enter text on multiple lines. This component uses the base structure of the Input component.

<Textarea id="textarea" label="Textarea" />

Usage​

To follow user-centred design and GDPR best practices, we should only ask users for information we need. In that respect, all form fields of the Pallote component library are by default required.

For the CSS library, you do not need to add the required property to the form fields, it is added automatically with the javascript import.

Props​

isFocused​

Focus on a input on page load.

<Textarea id="focused" label="IsFocused" isFocused />

Error​

Notify users that the field has an error.

<Textarea id="error" label="Error" error="This is the error message" />

Disabled​

Add this class to signal users the field is disabled.

<Textarea id="disabled" label="Disabled" disabled />

Optional​

<Textarea id="optional" label="Optional" optional />

Hint​

This is a hint to give more details

<Textarea id="hint" label="Hint" hint="This is a hint to give more details" />

Dense​

Reduce the font size and padding for a more compact appearance.

<Textarea id="dense" label="Dense" dense />

HideLabel​

Hide the label visually while keeping it accessible to screen readers.

<Textarea id="hideLabel" label="Hidden Label" hideLabel placeholder="Label is hidden but accessible to screen readers" />