Skip to content
EN

Popper API

The API documentation of the Popper React component. Learn more about the props and the CSS customization points.

Import

import Popper from '@material-ui/core/Popper';
// or
import { Popper } from '@material-ui/core';

You can learn more about the difference by reading this guide.

Poppers rely on the 3rd party library Popper.js for positioning.

Props

Name Type Default Description
anchorEl object
| func
This is the reference element, or a function that returns the reference element, that may be used to set the position of the popover. The return value will passed as the reference object of the Popper instance.
The reference element should be an HTML Element instance or a referenceObject: https://popper.js.org/popper-documentation.html#referenceObject.
children * node
| func
Popper render function or node.
container object
| func
A node, component instance, or function that returns either. The container will passed to the Modal component. By default, it uses the body of the anchorEl's top-level document object, so it's simply document.body most of the time.
disablePortal bool false Disable the portal behavior. The children stay within it's parent DOM hierarchy.
keepMounted bool false Always keep the children in the DOM. This prop can be useful in SEO situation or when you want to maximize the responsiveness of the Popper.
modifiers object Popper.js is based on a "plugin-like" architecture, most of its features are fully encapsulated "modifiers".
A modifier is a function that is called each time Popper.js needs to compute the position of the popper. For this reason, modifiers should be very performant to avoid bottlenecks. To learn how to create a modifier, read the modifiers documentation.
open * bool If true, the popper is visible.
placement 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top'
'bottom' Popper placement.
popperOptions object {} Options provided to the popper.js instance.
popperRef ref A ref that points to the used popper instance.
transition bool false Help supporting a react-transition-group/Transition component.

The ref is forwarded to the root element.

Any other props supplied will be provided to the root element (native element).

Demos