Bootstrap 5 Basic
Bootstrap 5 Flexbox
In Bootstrap 5, you can use the form-select
class to style HTML <select>
elements. The form-select
class provides a clean and modern design for dropdown menus, with various customization options.
Add the form-select
class to a <select>
element to create a styled dropdown.
Try it yourself
To make the entire select menu disabled, add the disabled
attribute.
Try it yourself
You can control the size of the select menu with the following classes:
Class |
Description |
---|---|
form-select-lg |
Large select menu. |
form-select |
Default size. |
form-select-sm |
Small select menu. |
Try it yourself
To allow multiple selections, add the multiple
attribute.
Try it yourself
Bootstrap supports validation styles for select menus:
Class |
Description |
---|---|
is-valid |
Adds a green border for valid. |
is-valid |
Adds a red border for invalid. |
Try it yourself