UiDropdownItem

A single row inside a dropdown.

Contents

A menu row with an icon, a label, an optional keyboard shortcut and a colour for destructive actions.

Examples

Rows

Items shown inside a menu-style panel.

<div class="w-56 rounded-xl border border-gray-200 bg-white p-1 shadow-card dark:border-gray-700 dark:bg-gray-900">
  <UiDropdownItem icon="mdi:pencil" label="Edit" />
  <UiDropdownItem icon="mdi:content-copy" label="Duplicate" shortcut="⌘D" />
  <UiDropdownItem icon="mdi:trash-can-outline" label="Delete" color="red" />
</div>

Props

NameTypeDefaultDescription
iconrequiredstringLeading MDI icon.
labelrequiredstringRow label.
shortcutstring''Keyboard shortcut hint shown on the right.
disabledbooleanfalseDisables the row.
colorstring'gray'Row colour. grayredgreenamber

Events

EventPayloadDescription
clickvoidEmitted when the row is activated (unless disabled).