Information

Help us improve the Design System by taking our short survey.

Textarea

A form field that allows users to enter multiple lines of text.

Sample HTML for Textarea example

<label class="ds_label" for="description">Description</label>
<textarea class="ds_input" rows="3" id="description" name="description"></textarea>

We based our textarea component on the one built by GDS. Find out more about the textarea component on GOV.UK’s Design System.

Website analytics

You can track interaction with the element through a data attribute showing the field type and field description.

The data attribute is added automatically by the Design System’s ‘tracking’ script.

Tracking attributes

Warning

Content of textareas would not be routinely tracked through website analytics due to the risk of gathering personally identifiable information.

Textareas get a data-form attribute. Its value uses the pattern textarea-[textarea ID].

<textarea class="ds_input" rows="3" id="description" data-form="textarea-description"></textarea>
Back to top