DropdownMenu
Render a button-backed Astryx dropdown menu.
Astryx Props
JSON-safe DropdownMenu props forwarded to Astryx.
Supported Astryx props include:
button(DropdownMenuButtonProps): Props for the trigger button (Button props except onClick).items(DropdownMenuOption[]; required): Array of menu entries. Each entry is one of: an action item '{label, onClick?, icon?, isDisabled?}', a divider '{type: "divider"}', or a section '{type: "section", title?, items: [...action items]}'.isMenuOpen(boolean): Controlled open state for the menu.onOpenChange((isOpen: boolean) => void): Callback fired when the open state changes.menuWidth(number or string): Custom menu width; defaults to matching the trigger button width.onClick(() => void): Callback fired when the trigger button is clicked.hasChevron(boolean): Whether to show a chevron icon on the trigger button. Set to false for icon-only triggers.children((item: DropdownMenuItemData) => ReactNode): Custom render function for each item in the list.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/DropdownMenu.
Functions
constructor__init__(items, *, label, variant='secondary', disabled=False, callbacks=None, action_callbacks=None, open=False, menu_width=None, chevron=None, placement=None, auto_focus=None, **props) -> NoneparamitemsIterable[Any]Item records used by generated child components or static search sources.
paramlabelstrVisible or accessible label for the component.
paramvariantstr= 'secondary'Astryx visual variant.
paramdisabledbool= FalseWhether the component should render disabled.
paramcallbacksIterable[Callable[[ComponentWidget], None]] | None= NonePython callbacks invoked for frontend activations.
paramaction_callbacksIterable[Callable[[ComponentWidget, Any], None]] | None= NonePython callbacks receiving the selected menu value.
paramopenbool= FalseControlled menu visibility.
parammenu_widthint | float | str | None= NoneMenu width; defaults to the trigger width.
paramchevronbool | None= NoneWhether the trigger shows a chevron.
paramplacementstr | None= NoneMenu placement relative to the trigger.
paramauto_focusbool | None= NoneWhether the first menu item receives focus on open.
parampropsAny= {}Returns
None