![]() |
VOOZH | about |
Primer CSS is a free and open-source CSS framework that is built using the GitHub design system for providing support to the broad spectrum of GitHub websites. It helps in creating the foundation of the basic style elements such as spacing, components, typography, color, etc.
Dropdowns are lightweight menus that provide navigation and actions. It is useful in the case when the data need to be organized & displayed with a clickable dropdown menu.
Primer CSS Dropdown Classes: We use the following classes for creating a basic dropdown.
Primer CSS Dropdown Options: We use the following classes.
Primer CSS Dropdown Divider: We use the following class.
Primer CSS Dropdown Header: We use the following class.
Syntax:
<div>
<details class="dropdown details-reset
details-overlay d-inline-block">
<summary class="btn" aria-haspopup="true">
Dropdown
<div class="dropdown-caret"></div>
</summary>
<ul class="dropdown-menu dropdown-menu-se">
<li> ... </li>
...
</ul>
</details>
</div>
Example 1: This example demonstrates the basic dropdown in Primer CSS.
Output:
Example 2: The below example demonstrates the implementation of all the dropdown options in Primer CSS.