Navbar with dropdown panel.
The component#
<div class="relative"><button class="flex items-center gap-1 text-sm font-medium">Product <span>▾</span></button><div class="absolute top-10 left-0 hidden w-64 rounded-xl border bg-white p-2 shadow-xl">panel</div></div>Responsive & dark#
Add dark: twins to every surface and text color (bg-white dark:bg-slate-900, border-slate-200 dark:border-slate-800). Because this recipe is pure utilities, dark mode is a per-class decision — see concepts/dark-mode-strategies|dark mode strategies.
Customization#
- Swap palette classes to re-theme instantly
- Adjust radii (rounded-lg → rounded-2xl) for tone
- Add
transition+ state variants for polish - Extract into a framework component when reused 3+ times
Related recipes#
recipes/index|Recipe index · components/index|Design components
