Skip to main content

Popout Menu Offset

The popoutMenuOffset prop used to adjust the distance or position at which the pop-out menu is displayed or positioned in relation to its trigger or parent element.

Props

popoutMenuOffset?: {
mainAxis?: number | ((params: { level?: number }) => number)
alignmentAxis?: number | ((params: { level?: number }) => number)
}

The popoutMenuOffset prop accepts an object with two optional properties:

PropertyDescription
mainAxisThis property controls the offset distance along the main axis of the menu.
alignmentAxisThis property controls the offset distance along the alignment axis of the menu.

With Parameter

The popoutMenuOffset prop accepts a function that receives an object with the following properties:

PropertyDescription
levelThe level of the menu. The root menu has a level of 0, and so on and so forth.

Example

/horizontal-menu/menu/popout-menu-offset/with-params

Source Code


Without Parameter

The popoutMenuOffset prop accepts a number that will be used as the offset distance along the main axis of the menu.

Example

/horizontal-menu/menu/popout-menu-offset/without-params

Source Code