Skip to contentPorsche Design System
You are currently viewing an earlier release of the Porsche Design System.Switch to the latest Porsche Design System documentation.
SearchGitHub repository of Porsche Design SystemOpen settings sidebar
Popover Table of ContentsPropertiesPropertyAttributeDescriptionTypeDefaultaria ariaSets ARIA attributes on the popover panel to improve accessibility for screen readers.type PopoverAriaAttribute = {
  'aria-label'?: string;
}
undefined
compact compactReduces padding and spacing for a more compact layout, useful in space-constrained interfaces.booleanundefineddescription descriptionSets the text content displayed inside the popover panel when it is open, providing contextual help or information. Takes precedence over the default slot when both are provided.stringundefineddirection directionSets the preferred direction for the popover to open relative to its trigger button. Falls back to the direction with the most available viewport space.type PopoverDirection =
'top'
'right'
'bottom'
'left'
'bottom'
open openControls whether the popover is visible. When set (controlled mode), visibility follows this prop and the consumer owns the open state via a slotted button. When omitted (uncontrolled mode), the component manages visibility itself.booleanundefined
EventsEventDescriptionTypedismiss Emitted in controlled mode when the user requests to close the popover via the Escape key, an outside click, or when keyboard focus leaves the popover (Tab / Shift+Tab). The event detail identifies which of the three was used.type PopoverDismissEventDetail = {
  reason: 'outside-click' | 'focus-out' | 'escape';
}
CustomEvent<PopoverDismissEventDetail>
SlotsSlotDescriptionisRequiredaltPropallowedTagNames<slot> Default slot for the popover content. Ignored when the `description` prop is set, which takes precedence.<slot name="button"> Renders a custom trigger button. When used, the default info button is replaced.CSS VariablesCSS VariableDescriptiondefaultValue--p-popover-w Width of the popover.max-content--p-popover-h Height of the popover.auto--p-popover-min-w Min width of the popover.0px--p-popover-min-h Min height of the popover.auto--p-popover-max-w Max width of the popover.min(calc(100dvw - 16px), 48ch)--p-popover-max-h Max height of the popover.calc(100dvh - 16px)--p-popover-px Horizontal padding of the popover. It is recommended to apply an existing Porsche Design System spacing token, e.g. the CSS declaration `--p-popover-px: var(--p-spacing-static-md)`, the Tailwind CSS arbitrary property `[--p-popover-px:var(--spacing-static-md)]` or the equivalent SCSS/JS token.16px--p-popover-py Vertical padding of the popover. It is recommended to apply an existing Porsche Design System spacing token, e.g. the CSS declaration `--p-popover-py: var(--p-spacing-static-sm)`, the Tailwind CSS arbitrary property `[--p-popover-py:var(--spacing-static-sm)]` or the equivalent SCSS/JS token.16px--p-popover-radius Border radius of the popover. It is recommended to apply an existing Porsche Design System border-radius token, e.g. the CSS declaration `--p-popover-radius: var(--p-radius-lg)`, the Tailwind CSS arbitrary property `[--p-popover-radius:var(--radius-lg)]` or the equivalent SCSS/JS token.12px
Global settingsColor SchemeAll color tokens use the light-dark() CSS function. Set the theme via the CSS color-scheme property: light for light mode, dark for dark mode, or light dark to follow the user's system preference.LightDarkLight DarkDirectionThe dir global attribute in HTML changes the direction of text and other content within an element. It's most often used on the <html> tag to set the entire page's direction, which is crucial for supporting languages that are written from right to left (RTL), such as Arabic and Hebrew. For example, using <html dir="rtl"> makes the entire page display from right to left, adjusting the layout and text flow accordingly.LTR (left-to-right)RTL (right-to-left)Text ZoomTo ensure accessibility and comply with WCAG 2.2 AA standards, it is mandatory for web content to support text resizing up to at least 200% without loss of content or functionality. Using relative units like rem is a best practice for achieving this, as they allow the text to scale uniformly based on the user's browser settings.100%130%150%200%