Zephora UI

Navigation

Dropdown

Trigger + floating Menu following the WAI-ARIA menu-button pattern. The trigger element is cloned with aria wiring; the popup positions itself and closes on selection. The popup renders a full Menu, so everything Menu supports — MenuSub submenus, MenuCheckboxItem, MenuRadioGroup/MenuRadioItem, icons and shortcuts — works inside a Dropdown unchanged.

Import

import { Dropdown, MenuItem, MenuGroup, MenuSeparator } from "@zephora/react";

Examples

Basic

Pass any element as `trigger`; items go in as children.

Selected: none

Placement

Position the popup with `placement` (default bottom-start).

API

Dropdown props

PropTypeDefaultDescription
trigger *ReactElementElement that toggles the menu; cloned with ref, aria and click wiring.
openbooleanControlled open state.
defaultOpenbooleanfalseInitial open state (uncontrolled).
onOpenChange(open: boolean) => voidCalled when the open state changes.
placementPlacement"bottom-start"Popup position relative to the trigger.
onSelect(value: string) => voidCalled with the activated item value; the menu also closes.
childrenReactNodeMenu content: MenuItem / MenuGroup / MenuSeparator, plus MenuSub, MenuCheckboxItem and MenuRadioGroup / MenuRadioItem — the popup is a regular Menu.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

Keyboard

KeyAction
Enter / Space / ArrowDown / ArrowUpOn the trigger: opens the menu and focuses the first item.
ArrowDown / ArrowUpMove between items inside the menu.
Enter / SpaceActivates the focused item and closes the menu.
EscapeCloses the menu and returns focus to the trigger.