Skip to content
LyEve UI v0.60.1

Navigation

Dropdown

A small menu attached to a trigger element. The trigger is the trigger snippet, which receives the open state and a toggle function, so it can take any shape.

Action menu

Icon trigger

Notes

  • The menu closes on outside click and on Esc.
  • Disabled items don't fire onclick and don't close the menu.
  • The danger variant tints the item on hover: useful for destructive actions.
  • A destructive item asks first. Its onclick awaits confirm() and deletes only on true, so a slip of the pointer in an open menu deletes nothing.

API

PropTypeDefaultDescription
items requiredArray<{ label, icon?, variant?, disabled?, onclick }> no defaultMenu items. icon is any @lucide/svelte component. Variant tints the row.
align 'left' | 'right''right'Which edge the menu aligns to.
class string no defaultExtra classes on the trigger wrapper.
trigger requiredSnippet<[{ open, toggle }]> no defaultRenders the trigger element. Receives the current open state and a toggle function.