Action menu panel.

The component#

html
<div class="w-48 rounded-xl border bg-white p-1 text-sm shadow-xl"><button class="block w-full rounded-lg px-3 py-2 text-left hover:bg-slate-50">Rename</button><button class="block w-full rounded-lg px-3 py-2 text-left text-red-600 hover:bg-red-50">Delete</button></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

recipes/index|Recipe index · components/index|Design components