Navigation

Dropdown menus for actions and links

Dropdowns expose grouped actions, navigation shortcuts, and icon rows from compact triggers. Use them in React toolbars and Next.js headers where space is limited but discoverability still matters.

Examples

Single-select closes the menu after a choice. Multi-select keeps the menu open and toggles checkmarks per item value.



Variant code examples

Each block matches one combination. Open “Show code” to copy the JSX; the leading comment names the variant row.

DropdownTrigger — variant × size

Three trigger variants with small, medium, and large sizes.






























DropdownContent — placement

Surfaces position relative to the trigger on top, bottom, left, or right.





DropdownContent — spacing

The spacing between the items in the dropdown content.








What it does

Typeahead and roving tabindex patterns keep long lists manageable.

Anchor positioning adapts to viewport edges automatically when configured.

Composition and API

Prefer compound subcomponents instead of one oversized prop bag. Export a small, documented API for your design system.

Ensure each item has readable labels and disabled items are skipped appropriately.

Common use cases

  • Overflow menus on table rows.
  • Account menus in application headers.
  • Compact filters for chart dashboards.
  • Secondary actions beside primary buttons.

Accessibility

Keyboard order, focus rings, and ARIA attributes should match production usage. Test with your supported browsers and assistive technologies when semantics are non-trivial.

This preview page exposes a single h1 in the hero for a clean outline.

Next.js integration notes

Colocate examples under the App Router, keep server and client boundaries explicit, and avoid pulling interactive overlays into unexpected server layouts.

Set NEXT_PUBLIC_SITE_URL so canonical and Open Graph URLs resolve on deploy.

FAQ

Does the Dropdown component work with Next.js App Router?

Yes. Import it like any other React component; keep interactive subtrees in client components when you need hooks or browser APIs, and leave static structure in server components where possible.

Can I customize dropdown with Tailwind CSS?

Zentauri UI exposes class-friendly variants and slots so you can extend styles with Tailwind utilities without fighting inline styles.

Is this Dropdown implementation accessible by default?

Primitives follow sensible defaults, but accessibility depends on how you label controls, manage focus, and wire keyboard handlers in your app. Validate critical flows with keyboard-only use and screen readers.