Text input
We based our text input component on the one built by GDS. Find out more about the text input component on GOV.UK’s Design System.
Size options
Fixed-width inputs
Fluid-width inputs
Text input with an associated button
Sometimes buttons are directly related to an input field, such as in a site search or date picker.
Currency text fields
If you are asking the user for a currency amount, use this version of a checkbox. It has a currency symbol that cannot be deleted by the user.
Currency input elements need to be wrapped in a div with class ds_currency-wrapper
.
The default currency symbol used is the pound sign. If you need to use a different symbol, you can specify that in a data-symbol attribute on the field’s parent element.
Inline text fields
In some cases it might be sensible to align text inputs inline, such as when asking for multiple short related fields.
Website analytics
Content of this form element would not be routinely tracked through website analytics due to the risk of gathering personally identifiable information. Interaction with the element can be tracked through a data attribute showing the the field type and field description.
The data attribute is added automatically by the Design System’s ‘tracking’ script.
Feedback, help and support
If you need help or support you can e-mail us at designsystem@gov.scot
There is a problem
Thanks for your feedback