Customize the native <select>s with custom CSS that changes the element’s initial appearance.
Default
Custom <select>menus need only a custom class,.form-selectto trigger the custom styles. Custom styles are limited to the <select>’s initial appearance and cannot modify the <option>s due to browser limitations.
<selectclass="form-select"aria-label="Default select example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select>
Sizing
Set heights using classes like .form-control-lgand .form-control-sm.
<selectclass="form-select form-select-lg mb-3"aria-label=".form-select-lg example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select><selectclass="form-select form-select-sm"aria-label=".form-select-sm example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select>
The multipleattribute is also supported:
<selectclass="form-select"multiplearia-label="multiple select example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select>
As is the sizeattribute:
<selectclass="form-select"size="3"aria-label="size 3 select example"><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select>
Disabled
Add the disabledboolean attribute on a select to give it a grayed out appearance and remove pointer events.
<selectclass="form-select"aria-label="Disabled select example"disabled><optionselected>Open this select menu</option><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3">Three</option></select>