Skip to content

components/dropdown-menu

@fungi.computer/caps


@fungi.computer/caps / components/dropdown-menu

DropdownMenuChangeDetails = BaseMenu.Root.ChangeEventDetails

Details supplied to a DropdownMenu open-change callback.


DropdownMenuChangeReason = BaseMenu.Root.ChangeEventReason

Supported DropdownMenuChangeReason values.


DropdownMenuInteractionOwner = "host" | "local"

Supported DropdownMenuInteractionOwner values.


DropdownMenuProps<Payload> > = BaseMenu.Root.Props<Payload> > & object

Props accepted by DropdownMenu.

optional interactionOwner?: DropdownMenuInteractionOwner

Payload = unknown


DropdownMenuContentProps = BaseMenu.Popup.Props & Pick<BaseMenu.Portal.Props, "container" | "keepMounted"> > & Pick<BaseMenu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">>

Props accepted by DropdownMenuContent.


DropdownMenuItemProps = Omit<BaseMenu.Item.Props, "onSelect"> > & object

Props accepted by DropdownMenuItem.

optional onSelect?: (event) => void

Called when this item is selected.

React.SyntheticEvent<HTMLDivElement>

void

optional variant?: "default" | "destructive"


DropdownMenuCheckboxItemProps = Omit<BaseMenu.CheckboxItem.Props, "onSelect"> > & Pick<DropdownMenuItemProps, "onSelect">>

Props accepted by DropdownMenuCheckboxItem.

const DropdownMenuTrigger: ForwardRefExoticComponent<Omit<Props<unknown>>, "ref"> > & RefAttributes<HTMLButtonElement>>>>

The trigger control for a DropdownMenu.


const DropdownMenuPortal: ForwardRefExoticComponent<Omit<MenuPortalProps, "ref"> > & RefAttributes<HTMLDivElement>> >> = BaseMenu.Portal

The native menu portal with caller-selected container and mount lifetime.


const DropdownMenuPositioner: ForwardRefExoticComponent<Omit<MenuPositionerProps, "ref"> > & RefAttributes<HTMLDivElement>> >> = BaseMenu.Positioner

The native positioning owner for anchors, collision boundaries and placement.


const DropdownMenuPopup: ForwardRefExoticComponent<Omit<MenuPopupProps, "ref"> > & RefAttributes<HTMLDivElement>>>>

The styled popup for caller-composed menu placement and portal ownership.


const DropdownMenuContent: ForwardRefExoticComponent<Omit<DropdownMenuContentProps, "ref"> > & RefAttributes<HTMLDivElement>>>>

The positioned content region for a DropdownMenu.


const DropdownMenuItem: ForwardRefExoticComponent<Omit<DropdownMenuItemProps, "ref"> > & RefAttributes<HTMLElement>>>>

An actionable item in a DropdownMenu.


const DropdownMenuCheckboxItem: ForwardRefExoticComponent<Omit<DropdownMenuCheckboxItemProps, "ref"> > & RefAttributes<HTMLElement>>>>

A checkable item in a DropdownMenu.


const DropdownMenuSeparator: ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> > & RefAttributes<HTMLDivElement>>>>

A visual separator in a DropdownMenu.

DropdownMenu<Payload>>(__namedParameters): Element

A menu controller with explicit controlled or uncontrolled open state.

Payload = unknown

DropdownMenuProps<Payload>

Element


useDropdownMenu(): object

Access the nearest DropdownMenu close operation.

close: () => void | undefined

Close the nearest menu, if it is mounted.

void | undefined