Popover
Leave feedbackPopovers are small overlays that present additional content without cluttering the page.
Note that from accessibility perspective Popover is treated as a tooltip (the element has role="tooltip") which means that it
shouldn't contain interactive elements (e.g, buttons, links, etc.), you can read more about tooltip specifications here.
Try using ModalPopup instead if you want Popover's behaviour with interactive elements.
Basic Usage
Any Paragon component or export may be added to the code example.
State variants
Any Paragon component or export may be added to the code example.
Theme Variables (SCSS)#
$popover-font-size: $font-size-sm !default;$popover-bg: $white !default;$popover-max-width: 480px !default;$popover-border-width: $border-width !default;$popover-border-color: rgba($black, .2) !default;$popover-border-radius: $border-radius-sm !default;$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;$popover-box-shadow: drop-shadow(0 2px 4px rgba(0, 0, 0, .15))drop-shadow(0 2px 8px rgba(0, 0, 0, .15)) !default;$popover-icon-margin-right: .5rem;$popover-icon-height: 1rem;$popover-icon-width: 1rem;$popover-header-bg: $white !default;$popover-header-color: $headings-color !default;$popover-header-padding-y: .5rem !default;$popover-header-padding-x: 1rem !default;$popover-body-color: $body-color !default;$popover-body-padding-y: $popover-header-padding-y !default;$popover-body-padding-x: $popover-header-padding-x !default;$popover-arrow-width: 1rem !default;$popover-arrow-height: .5rem !default;$popover-arrow-color: $popover-bg !default;$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;$popover-success-bg: $success-100 !default;$popover-success-icon-color: $success-500 !default;$popover-warning-bg: $warning-100 !default;$popover-warning-icon-color: $warning-500 !default;$popover-danger-bg: $danger-100 !default;$popover-danger-icon-color: $danger-500 !default;
- id
stringRequiredAn html id attribute, necessary for accessibility.
- placement
enum'auto' | 'top' | 'bottom' | 'left' | 'right'Default'right'Sets the direction the Popover is positioned towards.
This is generally provided by the
Overlaycomponent positioning the popover. - title
stringWhen this prop is set, it creates a
Popoverwith aPopover.Titleinside passing the children directly to it. - arrowProps
shape{ref:func|shape{current:},element,style:}shape{},An
Overlayinjected set of props for positioning the popover arrow.This is generally provided by the
Overlaycomponent positioning the popover. - content
boolWhen this prop is set, it creates a
Popoverwith aPopover.Contentinside passing the children directly to it. - popper
shape{}A
Popper.jsconfig object passed to the the underlying popper instance. - show
boolWhether the
Overlayis shown. - children
nodeSpecifies the content of the
Overlay - className
stringSpecifies class name to append to the base element
- variant
stringThe visual style of the
Overlay
- as
elementTypeDefault'div'Specifies the base element
- bsPrefix
stringDefault'popover-header'Overrides underlying component base CSS class name
- as
elementTypeDefault'div'Specifies the base element
- bsPrefix
stringDefault'popover-body'Overrides underlying component base CSS class name
Usage Insights#
Popover
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 6 | |
| frontend-app-course-authoring | 20.35.1 | 1 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 1 | |
| frontend-app-learner-record | 20.45.0 | 1 | |
| frontend-app-learning | 20.28.4 | 8 | |
| frontend-app-ora-grading | 20.45.1 | 2 | |
| frontend-app-support-tools | 20.45.0 | 1 | |
| frontend-component-header-edx | 20.45.5 | 1 | |
| frontend-component-header | 20.45.5 | 1 |
PopoverContent
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 6 | |
| frontend-app-course-authoring | 20.35.1 | 1 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 1 | |
| frontend-app-learner-record | 20.45.0 | 2 | |
| frontend-app-learning | 20.28.4 | 8 | |
| frontend-app-ora-grading | 20.45.1 | 3 | |
| frontend-app-support-tools | 20.45.0 | 1 | |
| frontend-component-header-edx | 20.45.5 | 1 | |
| frontend-component-header | 20.45.5 | 1 |
PopoverTitle
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 4 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 1 | |
| frontend-app-learner-record | 20.45.0 | 2 | |
| frontend-app-learning | 20.28.4 | 1 | |
| frontend-app-support-tools | 20.45.0 | 1 | |
| frontend-component-header-edx | 20.45.5 | 1 | |
| frontend-component-header | 20.45.5 | 1 |