ComponentsPopover
Version 0.11.1

Popover

A popover displays floating content anchored to a trigger element with automatic positioning and collision detection.

Usage#

import { DialogTrigger, Popover, Button } from '@backstage/ui';

<DialogTrigger>
  <Button>Open Popover</Button>
  <Popover>
    <div style={{ padding: '16px' }}>
      <p>This is a popover</p>
    </div>
  </Popover>
</DialogTrigger>

API reference#

DialogTrigger#

The trigger component that wraps both the trigger button and the popover content.

PropTypeDefaultResponsive
isDisabled
boolean
-No
delay
number
0No
closeDelay
number
0No
isOpen
boolean
-No
defaultOpen
boolean
-No
children
ReactNode
-No

Popover#

The main popover component that displays floating content with automatic positioning.

PropTypeDefaultResponsive
triggerRef
RefObject<Element | null>
-No
isEntering
boolean
-No
isExiting
boolean
-No
placement
toprightbottomleft
-No
containerPadding
number
12No
offset
number
8No
children
ReactNode
-No
className
string
-No
style
CSSProperties
-No

Theming#

Our theming system is based on a mix between CSS classes, CSS variables and data attributes. If you want to customise this component, you can use one of these class names below.

  • bui-Popover
  • bui-PopoverArrow
  • bui-PopoverContent

Changelog#