Advertisement
Google Ad Slot: content-top
Bootstrap 5 Select Menus
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.
Basic Select Menu:
Add the form-select class to a <select> element to create a styled dropdown.
Disabled Select Menu:
To make the entire select menu disabled, add the disabled attribute.
Sizing Options:
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. |
Multiple Select Menu:
To allow multiple selections, add the multiple attribute.
Customizing with Validation:
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. |