Popover
Placement
Section titled “Placement”certara-popover
Section titled “certara-popover”Floating panel anchored to a trigger element for menus, rich content, or contextual actions.
Properties
Section titled “Properties”hasPadding
| Attribute | has-padding |
| Type | boolean |
| Default | undefined |
| Required | false |
| Description | Whether to add padding to the popover DEPRECATED. Use spaceInside instead. Will be removed in the next major version. |
headline
| Attribute | headline |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Creates a header section for the popover |
open
| Attribute | open |
| Type | boolean |
| Default | undefined |
| Required | false |
| Description | Forces the popover to open or close. Closed when unset. |
opened
| Attribute | opened |
| Type | boolean |
| Default | undefined |
| Required | false |
| Description | Forces the popover to open or close DEPRECATED. Use open instead. Will be removed in the next major version. |
placement
| Attribute | placement |
| Type | "bottom" | "bottom-start" | "left" | "left-start" | "right" | "right-start" | "top" | "top-start" |
| Default | undefined |
| Required | false |
| Description | These options will suggest a starting point for the popover position, but <certara-popover> will automatically position itself within the viewport to avoid appearing offscreen |
popoverHeader
| Attribute | popover-header |
| Type | string |
| Default | undefined |
| Required | false |
| Description | Creates a header section for the popover DEPRECATED. Use headline instead. Will be removed in the next major version. |
position
| Attribute | position |
| Type | "absolute" | "fixed" |
| Default | 'absolute' |
| Required | false |
| Description | Use ‘fixed’ to break a popover out of a positioned container |
size
| Attribute | size |
| Type | "lg" | "sm" |
| Default | undefined |
| Required | false |
| Description | Sets a width on the popover |
spaceInside
| Attribute | space-inside |
| Type | "md" | "none" |
| Default | undefined |
| Required | false |
| Description | Whether to add padding to the popover. none removes it. Defaults to md. |
Events
Section titled “Events”| Name | Description | Bubbles |
|---|---|---|
certaraClose | Event emitted when popover is closed | false |
certaraOpen | Event emitted when popover is opened | false |
Methods
Section titled “Methods”| Name | Signature | Description |
|---|---|---|
hide | () => Promise<void> | Public method to hide the popover |
show | () => Promise<void> | Public method to show the popover |
| Name | Description |
|---|---|
| Content in the default slot is the opener for the popover. | |
popover-content | Content for the popover. |
A popover is a small overlay that displays supplemental information to the user. It can contain rich content and is triggered when the UI element it relates to is selected.
Design guidelines
Section titled “Design guidelines” Best practices
Section titled “Best practices”Use popovers for non-essential information that provides the user with additional guidance or actions.
- Can contain a header, formatted text, links, etc.
- Displaying a popover requires a user action (click, tap, or select via key command).
- Dismissing a popover also requires a user action.
- Be mindful of placement - a popover should not obscure critical elements on the page.
Accessibility
Section titled “Accessibility”- Popovers should be operable using the keyboard alone.
- Popovers should be announced by screen readers.
- When a popover is opened, focus should be moved to the popover so that keyboard users can interact with it.
- When the popover is closed, focus should be returned to the element that triggered it.
For more information, see our accessibility guidelines.