Skip to content
PixiKit

Popover

A panel anchored to a trigger. It scales out from the side it opens on, flips and shifts to stay in view, closes on Escape or an outside click, and can trap focus when modal.

pixikit.com/docs/components/popover

Customize

Default open
Placement
Offset10px
Match width
Modal
Arrow
Width272px
Portal

Props

13
NameTypeDefaultDescription
triggerReactNode"Open"What the trigger button shows. The button is owned by the popover and carries aria-expanded and aria-controls.
childrenReactNodeNoneThe panel content.
openbooleanNoneWhether the panel is open, when you hold the state.
defaultOpenbooleanNoneWhether the panel is open at first, when the popover holds the state.
onOpenChange(open: boolean) => voidNoneCalled with the next open state.
placementPlacement"bottom"Where the panel sits around the trigger; it flips when there is no room.
offsetnumber8Gap in px between the trigger and the panel.
matchWidthbooleanfalseGives the panel the width of the trigger.
modalbooleanfalseTraps focus inside the panel and returns it to the trigger on close.
arrowbooleanfalseDraws a small arrow pointing at the trigger.
widthnumberNoneWidth of the panel in px; leave out to fit the content.
portalbooleantrueRenders the panel in a portal on the page body; turn off to keep it inline.
classNamestringNoneExtra classes for the panel.

More interaction components in Pro

View all

Related