DevExtreme React - Overview
The Popover is a widget that shows notifications within a box with an arrow pointing to a specified UI element.
The following code creates a simple Popover on your page and attaches it to another element (in this example, to an image).
- import React from 'react';
- import 'devextreme/dist/css/dx.common.css';
- import 'devextreme/dist/css/dx.light.css';
- import { Popover } from 'devextreme-react/popover';
- const renderContent = () => {
- return (
- <p>Popover content</p>
- );
- };
- class App extends React.Component {
- render() {
- return (
- <div>
- <img id="image" src="https://url/to/an/image" />
- <Popover
- target="#image"
- showEvent="dxhoverstart"
- hideEvent="dxhoverend"
- contentRender={renderContent}
- />
- </div>
- );
- }
- }
- export default App;
There are several ways to specify the content of the Popover. Learn more in the Customize the Content article. The Popover can also be displayed with a title and toolbars. For detailed information, see the Customize the Title and Specify Toolbar Items topics.
See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.