Dropdown

Contextual action menu anchored to a trigger. Supports icons, keyboard shortcuts, dividers, destructive items, disabled items, and left/right alignment.

import{ DropdownMenu } from "@pepulux/ui"

Default — with icons and divider

Actions button trigger, right-aligned panel. Divider separates destructive action.

With keyboard shortcuts

Pass shortcut to display a keyboard hint on the right side of each item.

Icon-only trigger — three-dot menu

Commonly used in table rows and cards for compact action menus.

Disabled items

Pass disabled: true on individual items. They appear dimmed and non-clickable.

Left alignment

Pass align='left' to anchor the panel to the left edge of the trigger.

Props

PropTypeDefaultDescription
trigger*ReactNodeElement that opens the menu on click
items*DropdownItem[]Menu items — see DropdownItem props below
align"left" | "right""right"Horizontal alignment of the panel relative to the trigger
widthnumber | string216Panel width in pixels or CSS value
classNamestringAdditional CSS classes on the wrapper

Props

PropTypeDefaultDescription
type"item" | "divider""item"item renders a button; divider renders a horizontal rule
labelstringText label (item type)
iconReactNodeLeading 14px icon
shortcutstringKeyboard shortcut hint shown on the right
destructivebooleanfalseRed text + red hover — use for permanent delete actions
disabledbooleanfalseDims the item and blocks the click
onClick() => voidCalled when item is clicked (panel closes after)