From the course: Bootstrap 4 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use dropdowns - Bootstrap Tutorial
From the course: Bootstrap 4 Essential Training
Use dropdowns
- [Instructor] Dropdowns are a common design patterns in Bootstrap. You can create them easily for different components, so let's take a look. You can use dropdown in a bunch of different components including navs, tabs, and buttons. If you've been following along, you've already seen how to work them into navbars which is also how you implement them in navs. You create dropdowns in two parts. First, you create a button to trigger the dropdown and then create the menu itself. They're tied under our dropdown container that toggles the dropdown menu. For the menu, you can either use anchor tag links or buttons. The classes for a basic dropdown are the dropdown class on the container of both the trigger and the menu element, the dropdown-toggle class on the button that triggers the menu, and then the dropdown-menu class which is the container for the menu. You also add a dropdown-item on each individual menu item which is either a link or a button. Inside the dropdown, you can add a few…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Interactive component overview1m 24s
-
(Locked)
Add tooltips7m 21s
-
(Locked)
Display popovers5m 20s
-
(Locked)
Create alerts4m 14s
-
(Locked)
Use dropdowns8m 15s
-
(Locked)
Add collapse accordions12m
-
(Locked)
Use modals12m 3s
-
(Locked)
Build carousels13m 37s
-
(Locked)
Use scrollspy6m 56s
-
(Locked)
Toasts6m 10s
-
(Locked)
Spinners5m 34s
-
(Locked)
Pagination3m 21s
-
(Locked)
Stretched links3m 11s
-
(Locked)
Embeds3m 9s
-
(Locked)
-