Popover
Popover provides a generic anchored top-layer surface for authored content that is not a menu, tooltip, or modal dialog.
Popover is optional. Use it when you need a small anchored panel with simple open/close behavior, light dismiss, and basic positioning. For richer interaction patterns, prefer a purpose-built component such as Menu, Tooltip, Dialog, DatePicker, or TimePicker, or compose directly with the native Popover API and the library's styling tokens.
Anatomy
| Element | Part | Selector |
|---|---|---|
<div> | root | [data-scope="popover"][data-part="root"]LMBCopy |
<div> | surface | [data-scope="popover"][data-part="surface"]LMBCopy |
Props
| Name | Description | Default | Control |
|---|---|---|---|
idOptional | Optional explicit id for the popover element. string | undefined | undefined | |
popoverOptional | Native popover behavior. automanualhint | "auto" | |
placementOptional | Preferred placement relative to the anchor. bottom-startbottombottom-endtop-starttoptop-endstartstart-topstart-bottomendend-topend-bottom | "bottom-start" | |
anchorNameOptional | CSS anchor name used to position the popover. string | undefined | undefined | |
anchorElementOptional | Element used as the position anchor and showPopover source. HTMLElement | undefined | undefined | - |
matchAnchorWidthOptional | Whether the popover surface should match the anchor width. boolean | undefined | false | |
roleOptional | Accessible role for authored interactive content. string | undefined | undefined | |
ariaLabelOptional | Accessible label for the popover surface. string | undefined | undefined | |
ariaLabelledByOptional | Element id that labels the popover surface. string | undefined | undefined | |
teleportOptional | Teleport target. Set to false to render in place. string | boolean | undefined | "body" | - |
openOptional | - boolean | undefined | false |
Events1
| Name | Type | Description |
|---|---|---|
update:open | [value: boolean] | - |
Slots1
| Name | Parameters | Description |
|---|---|---|
default | - | Popover content. |
Styling8
| Token | Description |
|---|---|
--md-popover-container-colorColorFallback var(--md-sys-color-surface-container) | Controls popover container color. |
--md-popover-container-elevationElevationFallback var(--md-sys-elevation-level2) | Controls popover container elevation. |
--md-popover-container-shapeShapeFallback var(--md-shape-popover) | Controls popover container shape. |
--md-popover-max-heightLayoutFallback 32rem | Controls popover maximum height. |
--md-popover-max-widthLayoutFallback 28rem | Controls popover maximum width. |
--md-popover-min-widthLayoutFallback 0rem | Controls popover minimum width. |
--md-popover-on-container-colorColorFallback var(--md-sys-color-on-surface) | Controls popover content color. |
--md-popover-paddingLayoutFallback 1rem | Controls popover content padding. |