Instructor Created Collection

Build and Style a Dropdown in Tailwind

ClockIcon38m
tailwindTailwind
RssIconRSS

A menu dropdown is a common component that you will build and style in any application. In this collection we'll start from scratch, build and style a static dropdown menu and then add functionality to the component so you can open and close the dropdown. There are some keyboard accessibility topics we'll cover when adding interactivity to the dropdown. We'll use Vue in this example but these concepts will apply to any framework.

After the drop down is fully functional and styled properly, we'll see how sometimes you need to rethink the design of a component when considering the mobile view. For this case, the dropdown is removed entirely and the links shown inline underneath the navbar content.