Select with search (experimental) example
With preselect
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/select_with_search", {
id: "dropdown-with-preselect",
label: "Option 2 preselected",
options: [
{
text: "Option one",
value: "option1"
},
{
text: "Option two",
value: "option2",
selected: true
},
{
text: "Option three",
value: "option3"
}
]
} %>