An `<sp-popover>` is used to display transient content (menus, options, additional actions etc.) and appears when clicking/tapping on a source (tools, buttons, etc.) It stands out via its visual style (stroke and drop shadow) and floats on top of the rest
npm install @spectrum-web-components/popoverAn is used to display transient content (menus, options, additional actions etc.) and appears when clicking/tapping on a source (tools, buttons, etc.) It stands out via its visual style (stroke and drop shadow) and floats on top of the rest of the interface. This component does not implement the actual overlay behavior and interactions. This is handled by the Overlay system.



```
yarn add @spectrum-web-components/popover
Import the side effectful registration of via:
``
import '@spectrum-web-components/popover/sp-popover.js';
When looking to leverage the Popover base class as a type and/or for extension purposes, do so via:
``
import { Popover } from '@spectrum-web-components/popover';
`html
style="
position: relative;
height: 100px;
"
>
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
$3
#### Default with no tip
Default popover with no tip and no placement. Popovers will fill up the space of their containing element by default. The default popover has no padding.
`html
style="
position: relative;
height: 180px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
#### Dialog popovers
To apply a managed amount of padding within your
, you may choose to wrap your slotted content in an element, as seen below:`html
style="
position: relative;
height: 250px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
#### Popover with tip
The
placement attribute can be used to customize how the points to its related content. placement="top" will point down to the related content from the top, etc.
Top
`html demo
style="
position: relative;
height: 250px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
Right
`html demo
style="
position: relative;
height: 200px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
Bottom
`html demo
style="
position: relative;
height: 200px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
Left
`html demo
style="
position: relative;
height: 200px;
max-width: 320px;
"
>
Popover title
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
``For components used with a popover, see the accessibility guidelines of the particular component.