Skip to content
Components

Popover

A small overlay that opens on demand. Popovers allow users to access additional content and actions without cluttering the page.

First, import the component.

import {Popover} from '@pleo-io/telescope'

Then use it, like so:

PropTypeDefault
defaultOpen

boolean

-
open

boolean

-
onOpenChange

(boolean) => void

-

The Trigger is the element that toggles the popover.

The Trigger must be an element with a role that supports the aria-expanded attribute. If it doesn't support this attribute, wrap it in a Naked Button.

The Trigger must also feature an accessible name. If it doesn't have one (e.g. when using an Icon), provide one by using a Visually Hidden label.

By default the Content will position itself against the trigger.

The Anchor is an optional element, which can be used to position the popover against another element.

The component that pops out when the popover is open.

PropTypeDefault
matchWidth

boolean

false
side

"top" | "bottom" | "left" | "right"

"bottom"
align

"start" | "center" | "end"

"center"
portalled

boolean

true

An optional arrow which points from the Content component to the Trigger component.

A styled container that is used to contain the Close and ActionButton components.

A button that closes the popover.

A styled button usually placed inside the ControlsContainer.