Pop Over

The Pop Over component displays floating contextual content when a trigger element is clicked.

Usage

Default


<PopOver
  asChild
  trigger={<Button size="small">Toggle Popover</Button>}
  content={
      "This is some helpful info shown in a popover."
  }
/>

Props

Data table
TypeDescription
aria-describedbystringAssociates the popover content with an external description element ID.
aria-labelstringAccessible label for the popover content region.
aria-labelledbystringAssociates the popover content with an external label element ID.
aria-modalbooleanWhether the popover should be announced as modal when role is dialog.
asChildbooleanWhen true, the popover will clone the provided trigger element and attach popover behavior directly to it instead of wrapping it in an internal button.
classNamestringOptional additional class name(s) for custom styling.
contentReactNodeContent to be displayed inside the popover.
contentClassNamestringOptional additional class name(s) for the popover content element.
data-testidstringOptional test ID for testing frameworks.
disabledbooleanDisables interaction with the trigger and popover.
idstringOptional ID for the popover content element.
placement"left" | "right" | "top" | "bottom"Placement of the popover relative to the trigger element. One of: "top" | "bottom" | "left" | "right"
roundingRoundingTypeRounding of the popover content. One of: "none" | "small" | "medium" | "large" | "full"
shadowShadowTypeShadow of the popover content. One of: "none" | "light" | "medium" | "strong" | "intense"
stateStateTypeState of the popover, for feedback styling. One of: "success" | "error" | "warning" | "disabled" | ""
themeThemeTypeTheme for the popover styling. One of: "primary" | "secondary" | "tertiary" | "quaternary" | "clear"
triggerReactNode | React.ReactElement<TriggerElementProps, string | JSXElementConstructor<any>>Trigger content for the popover. When `asChild` is false or omitted, this can be any renderable node and will be wrapped in an internal button element. When `asChild` is true, this should be a single interactive React element such as a button, link, or custom Button component so the popover can attach behavior directly to it without nesting buttons.
triggerAriaLabelstringAccessible label for the trigger button or trigger element.
triggerTitlestringOptional title attribute for the trigger element.