{{#extend "layout-docs"}}
{{#replace "pageTitle"}}Select{{/replace}}
{{#replace "main"}}
A default Select
{{#each select}}
{{/each}}
{{> select-src}}Introduction
<select> element that can be enhanced with JavaScript to allow for both custom styling and an input bar to filter options.
src/html/components/select.hbssrc/styles/components/elements/_select.scsssrc/scripts/modules/jquery.pfSelect.js| JavaScript hooks/values | Effect | Required |
|---|---|---|
data-js=enhance-select |
Placed on any select that you want to be enhanced with custom styling. |
Optional |
data-select-filter=true |
Placed on any [data-js=enhance-select] element to include a filter input bar. |
Optional |
data-select-filter=true |
Placed on any [data-js=enhance-select] element to include a filter input bar. |
Optional |
data-display=[DISPLAY-TEXT] |
Placed on any option element where you want the selected text to be different to the text shown in the dropdown. |
Optional |
.enhanced-select--box |
When placed on the select element will render a boxed select element. | Optional |
[disabled] |
Adding this attribute to the select will disable the select and add a .enhanded-select--disabled class to the wrapper. |
Optional |