CSS dropdown menus

Navigation bars, mega menus, context menus and flyouts.

A hover-only dropdown is a menu that does not exist on a touchscreen, so everything here opens on click or focus as well. The mega-menu variants are grids rather than nested lists, which is what lets a wide panel lay out in columns without the markup pretending to be a tree it is not.

34 matching34 effectsFree to copy

Pure-CSS hamburger menu using the checkbox hack — three lines morph into an X with no JavaScript.

A segmented pill tab control with a floating indigo indicator that snaps to the selected option via :has().

A native <details>-based dropdown that animates open, with arrow rotation and hover-highlighted menu items.

A breadcrumb trail with chevron separators that nudge forward on hover, and a bolded current page.

Slate pill nav with the active item highlighted in blue.

Inline nav with active item marked by an ocean gradient underline.

Frosted floating dock whose icons spring up and take on the ocean gradient under the pointer.

Sticky-header pill navigation on a blurred translucent bar, with a blue active state.

Docs breadcrumb with CSS-drawn chevrons and a blue current page.

Frosted mobile tab bar where the active item takes an ocean tint and lifts its icon.

Vertical nav whose active marker grows from the centre out, so hover and selected read as the same gesture at two lengths.

Dropdown panel opening on hover and on `:focus-within`, so it is reachable by keyboard, with `visibility` transitioned so it is not tabbable while faded out.

Right-click menu with a rule between groups and each item's binding right-aligned, dimmed until the row is hovered so the shortcuts do not compete.

Page links with an elided middle and tabular numerals, so widths stay even from page 2 to page 18 and the control never reflows.

Compact product header carrying mark, search, links and account in one blurred row, the search flexing so the ends stay pinned at any width.

Segmented flow header where each step's arrow is a rotated square inheriting its own background, so the notch always matches the segment behind it.

Language menu listing each option in its own script rather than in the current one, with the ISO code trailing so the list stays scannable to someone who cannot read the endonym.

Three-column link map under a gradient border-image rule, each link underlining from its leading edge so the columns stay quiet until something is pointed at.

Nav split by labelled section with the active row marked by a rail bleeding past the panel padding, so the indicator belongs to the sidebar rather than the item.

Mobile tab bar whose primary action sits raised in the middle, punched out of the bar by a ring shadow in the bar's own colour rather than by a real cut-out.

Docs-style on-this-page list where the indigo rail marker jumps to whichever heading is hovered.

A fuchsia hub button that spins into an X while four actions fan out along an arc on hover.

Horizontal nav where hovering the Products link drops a sky-outlined panel of sub-links into view.

Slanted parallelogram tabs where the orange fill wipes out of the active tab and into the hovered one.

Showing 24 of 34. Search the rest →

Questions about css dropdown menus

What keyboard behaviour does a menu need?
Enter or Space to open, Escape to close and return focus to the trigger, and arrow keys to move between items. Tab alone through a long menu is technically usable and practically awful.
Should the trigger be a link or a button?
A button with `aria-expanded`, unless the top-level item is itself a destination. A link that opens a panel instead of navigating breaks middle-click and Ctrl-click, which is how a lot of people browse.
Are these css dropdown menus free to use?
All 34 are free to copy and use in your own projects, including commercial ones. A Pro licence exists for redistribution — shipping them inside a product other people buy — and the full terms are on the licence page.
How do I add one to my project?
Copy the CSS and the markup from the artifact's page — there is nothing to install, no runtime and no build step. The CLI (`npx hoverlab add`) is there for the component tiers above these, where a file gets written rather than pasted.