React Common - Object Structures - positionConfig - my

Specifies the overlay element's side or corner to align with a target element.

Type:

String

|

Object

Accepted Values: 'bottom' | 'center' | 'left' | 'left bottom' | 'left top' | 'right' | 'right bottom' | 'right top' | 'top'

To set this property, use an object with the x and y fields. These fields specify the overlay element's horizontal and vertical sides, respectively. Alternatively, you can use a string shortcut from the accepted values list.

App.js
  • import React from 'react';
  •  
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import Popup, {
  • Position,
  • My
  • } from 'devextreme-react/popup';
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <Popup ... >
  • <Position
  • my="left top">
  • {/* or */}
  • <My x="left" y="top" />
  • </Position>
  • </Popup>
  • );
  • }
  • }
  • export default App;

x

Specifies a position in the horizontal direction (for left, right, or center alignment).

Type:

String

Accepted Values: 'center' | 'left' | 'right'

y

Specifies a position in the vertical direction (for top, bottom, or center alignment).

Type:

String

Accepted Values: 'bottom' | 'center' | 'top'