Extended from Reka UI Popover
A popover is opened on tap or click and displays a speech-bubble-like popup with some additional information. For keyboard users and screen readers, it acts like a modal dialog in that it traps focus until you close it. This is ideal for accessibility — especially when the popover contains interactive elements like a link or button — so that users can browse the full contents of the popover before continuing down the page.
Using the side
prop allows you to control on which side of the triggering element the popover will attempt to appear. If there is not enough room on that side, the popover will switch to the opposite side.
Positioned on top (default)
Positioned on right
Positioned on bottom
Positioned on left
These examples show the recommended styling for headings and how a link or button should appear at the bottom of the popover.
This popover contains a heading and a link
This popover contains a heading and a button
This example shows how to tell the popover that there is a sticky element it should treat as the edge of visibility and flip the popover to the opposite side when reached. This is useful when there is a sticky navbar or CTA banner on the page and you want to ensure the popover remains visible and doesn't appear partially hidden underneath it.
This popover will flip when it gets 100px away from the top of the viewport
This example shows how to control the visibility of the popover from an external source. It can still be opened and closed via the trigger button and via click/tap outside, but the buttons also have the ability to show and hide the popover.
Use the light variant
if the popover will appear against a dark background.
This popover only contains text
This popover contains a heading and a link
This popover contains a heading and a button
collisionPadding
number or object
0
show
boolean or undefined
undefined
side
String
'top'
triggerClass
String
''
triggerDescription
String
'More information'
variant
String
'dark'
trigger
update:show
boolean