Select (dropdown)
A form field that allows users to pick a single item from a list of options.
Sample HTML
<div>
<label class="ds_label" for="component">Select a component</label>
<div class="ds_select-wrapper ds_input--fluid-one-third">
<select class="ds_select" id="component">
<option></option>
<option>Accordion</option>
<option>Breadcrumbs</option>
<option>Button</option>
</select>
<span class="ds_select-arrow" aria-hidden="true"></span>
</div>
</div>
We based our select component on the one built by GDS. Find out more about the select component on GOV.UK’s Design System.
Website analytics
Select components can be tracked through custom events and the original page path. Custom events are used as the data isn’t available at the instant an option is chosen and the clicktext could potentially contain personally identifiable information.
Tracking data attributes and events are added automatically by the Design System’s ‘tracking’ script.
Feedback, help or support
If you need any help or want to give any feedback you can e-mail us at: designsystem@gov.scot