Tailwind CSS Dropdown - Flowbite
Get started with the dropdown component to show a list of menu items when clicking on the trigger element based on multiple layouts, styles, and placements
The dropdown component can be used to show a list of menu items when clicking on an element such as a button and hiding it when focusing outside of the triggering element.
Make sure to include Flowbite’s JavaScript file inside your project to enable dropdowns.
Dropdown example #
If you want to show a dropdown menu when clicking on an element make sure that you add the data attribute data-dropdown-toggle="dropdownId" to the element (ie. a button) that will trigger the dropdown menu.
The dropdownId is the id of the dropdown menu element.