Dropdown

Contextual action menu anchored to a trigger. Figma trigger types: Button (simple, advanced, link), Icon, Account (avatar, button, card, breadcrumb), Search and Integrations — plus the Context menu. Supports icons, supporting text, shortcuts, checks, dividers, destructive items, scrollbar and left/right alignment.

import{ DropdownMenu, DropdownTrigger, AccountTrigger, ContextMenu } 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.

Trigger: Button — simple, advanced, link

DropdownTrigger variants; chevron={false} hides the chevron (Figma Chevron dropdown).

Options
Settings
More actions

Trigger: Account — avatar, button, card, breadcrumb

Account list items use avatar, description and checked.

OR
OROlivia Rhye
OROlivia Rhyeolivia@pepulux.com
PPepulux

Search and scrollbar

searchable adds a filter box; maxHeight makes a long list scroll. Open by default via defaultOpen.

Workspaces

Integrations — grid layout

Context menu

Right-click the area.

Right-click anywhere in this box

Props

PropTypeDefaultDescription
trigger*ReactNode—Element 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
placement"bottom" | "top""bottom"Open below or above the trigger
layout"list" | "grid""list"list items or grid tiles (Figma Integrations)
searchableboolean—Search box that filters items (Figma Search simple / advanced)
header / footerReactNode—Custom content above / below the items
maxHeightnumber | string320Scroll after this height (Figma Scrollbar)
defaultOpen / open / onOpenChangeboolean / boolean / (open) => void—Uncontrolled or controlled open state (Figma Open)
keepOpenboolean—Keep the menu open after choosing an item
classNamestring—Additional CSS classes on the wrapper

Props

PropTypeDefaultDescription
type"item" | "divider""item"item renders a button; divider renders a horizontal rule
labelstring—Text label (item type)
iconReactNode—Leading 14px icon
descriptionstring—Supporting text under the label
avatarReactNode—Avatar before the label (account list item)
checkedboolean—Check mark on the right (selected account / option)
shortcutstring—Keyboard shortcut hint shown on the right
destructivebooleanfalseRed text + red hover — use for permanent delete actions
disabledbooleanfalseDims the item and blocks the click
onClick() => void—Called when item is clicked (panel closes after)
Base component → Dropdownswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Menus for actions, not form values

A dropdown opens a list of actions anchored to a trigger. Use Select for choosing a value in a form. Put destructive actions last and colour them red; separate them with a divider.

Triggers can be a button, icon, account avatar, search field or integration grid — pick the one that fits the surface.

Do

  • Keep items to a scannable length
  • Use keyboard shortcuts for frequent actions

Don't

  • Nest menus more than one level deep

Keyboard behaviour

Escape closes the menu and clicking outside dismisses it. Items are buttons with role="menuitem", so they are reachable by keyboard.