Skip to Content
Referencefusion-uiComponentsControlsPopoverMenu

PopoverMenu

The PopoverMenu component is a combination of the Popover and Menu components. It’s a convenience component for the common use-case of displaying a menu inside a popover.


() => {
  const [isOpen, setIsOpen] = React.useState(false);

  return (
    <Box position="relative" size="fitContent">
      <Button onClick={() => setIsOpen(!isOpen)}>Open Menu</Button>
      <PopoverMenu
        open={isOpen}
        onClose={() => setIsOpen(false)}
        anchor={{
          parent: Origin.bottomLeft,
          child: Origin.topLeft,
          offset: { y: "8px" },
        }}
        menu={{
          items: [
            { label: "Olive-sided Flycatcher" },
            { label: "Sage Sparrow" },
            { label: "Lark Bunting" },
          ],
        }}
      />
    </Box>
  );

}

Features

The PopoverMenu component is a convenience component for the common use-case of displaying a menu inside a popover. It combines the Popover and Menu components into a single, easy-to-use component. For more information about their features, see the documentation for each component.

Reference

PopoverMenuProps

The PopoverMenu component accepts all props from the Popover component, except for children.

NameTypeRequiredDescription
menuMenuPropstrueThe props to pass to the Menu component.

Tokens

The PopoverMenu component uses tokens from both the popover and menu components.

Popover

KeyDefault Value
KeyDefault Value
surface.base.backgroundColorvar(--_1i4ikbk10)
surface.base.borderRadiusvar(--gpqiqdw)
surface.base.borderWidth0
surface.base.borderStylesolid
surface.base.borderColorvar(--_1i4ikbkx)
item.base.paddingLeftvar(--gpqiqd9)
item.base.paddingTopvar(--gpqiqd7)
item.base.paddingRightvar(--gpqiqd9)
item.base.paddingBottomvar(--gpqiqd7)
item.base.borderRadius0
item.base.backgroundColorvar(--_1i4ikbk10)
item.base.gapvar(--gpqiqd9)
item.base.colorvar(--_1i4ikbkv)
item.base.:hover.backgroundColorcolor-mix(in srgb, transparent 95%, var(--_1i4ikbkv) 5%)
item.base.:hover.colorvar(--_1i4ikbkv)
item.base.:focus-visible.backgroundColorcolor-mix(in srgb, transparent 95%, var(--_1i4ikbkv) 5%)
item.base.:focus-visible.colorvar(--_1i4ikbkv)
item.base.:active.backgroundColorcolor-mix(in srgb, transparent 95%, var(--_1i4ikbkv) 5%)
item.base.:active.colorvar(--_1i4ikbkv)
label.base.fontvar(--_1i4ikbk28)
Last updated on