From the course: Bootstrap 5 Essential Training

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Selects and range

Selects and range

- [Instructor] Let's talk about some of the other form elements that you can use. So we'll focus on two of them, select and range, but these work pretty much like any other specialty form input element. First, select is pretty easy. You have a form-select field that you should use on the select element. And then you can specify one of these two sizes, either small or large, and that's pretty much it. And then otherwise, you code the select field just like you would. It supports attributes like multiple and disabled. And if you want to try it, let's check it out. So we can take a look here and see the different kinds of select fields that we have. So this is just a regular one and all I've done here is add a form select onto the select tag right here. So that's what gives it the styling. Otherwise, it looks just like my input field and you can see that there is a small and a large version. And all I do there is add form-select and then form-select and one of the sizing attributes. And…

Contents