Popovers are floating overlays that contain additional information or interactive content.
Popovers display supplementary content within a floating overlay anchored to a trigger element. They support both static text and interactive elements such as buttons, links, or forms. Use Popovers when content is too long and detailed for a Tooltip but does not warrant a full Modal or new page.
Popovers, Modals, and Tooltips all display content within a floating overlay. While similar, they are not interchangeable and each have their own separate use cases:
Never nest Popovers. While doing so is possible, it's not a pattern we'd like to encourage due to poor user experience. Nested Popovers complicate a workflow and increase the cognitive load a user may experience when attempting to read supplemental information or take an action.
Consider the following questions if nested Popovers become a consideration:
The arrow is displayed by default to visually connect the Popover to its trigger. The arrow can be hidden when the Popover's trigger association is evident.
The default arrow connects the Popover to its trigger.
Arrows may be removed for a cleaner look in denser layouts.
Popovers support multiple trigger styles depending on the context.
The default trigger renders as inline text, blending with surrounding content.
An underlined trigger makes the interactive element more visually distinct within body text.
A Pluma Button can serve as the Popover trigger, providing a more prominent call to action.
Custom Popover triggers may be created with the available Popover subcomponent.
By default, the Popover overlay is hidden and can be opened with an interactive trigger.
The Popover becomes visible when the user activates the trigger.
Popovers animate in and out with a subtle fade and directional slide. The slide direction matches the Popover's placement relative to its trigger. The default transition duration is 125ms and can be customized with a component property.
Popovers that open on hover appear after a 250ms delay by default to prevent accidental activation during normal mouse movement. This delay can be adjusted as needed.
Popovers can be dismissed through clicking outside of the Popover, moving focus to another element outside the Popover, or pressing the Escape key while it's open. After closing, focus returns to the Popover's trigger.
Closing the Popover on focus loss can be disabled.
By default, Popovers close on outside click, Escape key, and focus loss.
Popovers can be configured to stay open when focus leaves, requiring an explicit click outside or Escape key press to dismiss.
Popovers can become draggable, allowing users to reposition the floating overlay. Draggable Popovers include a drag handle that supports mouse and keyboard interaction.
When the drag handle is focused, press the Space key and move the Popover with the arrow keys.
A drag handle allows users to reposition the Popover by clicking and dragging or keyboard.
Popovers can be positioned on any side of their trigger. The placement is not a guaranteeāsmaller viewports may cause the Popover to reposition as needed to remain visible to the user.
Bottom positioning is the default.
Positions the Popover above the trigger.
Positions the Popover to the right of the trigger.
Positions the Popover to the left of the trigger.
The most basic Popover content includes a header and description. The header should summarize the topic or intention while the description should further explain it. Be sure to write both in sentence case.
Though Popovers typically contain more content than Tooltips, it's still recommended to keep Popover content concise. Use a maximum of three sentences. For longer content, consider using a Modal or moving content directly to the page flow.
When Popovers include interactive elements, use labels that describe what action will take place.