Types
The types of side menu.
SideMenuElement
Side menus around a center.
class SideMenuElement implements LayoutElement<Uses>
| Member | Type | Description |
|---|---|---|
| left | left(left: SideMenuSide): SideMenuElement<Uses> | |
| right | right(right: SideMenuSide): SideMenuElement<Uses> | |
| gesture | gesture(openGestureMode: NonNullable<OptionsSideMenu['openGestureMode']>): SideMenuElement<Uses> | Where a swipe opens a menu. |
| animation | animation(animationType: NonNullable<OptionsSideMenu['animationType']>): SideMenuElement<Uses> | iOSiPadOSAndroid (not supported) |
| ios | ios(build: (menu: SideMenuElement<Uses>) => SideMenuElement<Uses>): SideMenuElement<Uses> | Modifiers for iOS only. |
| android | android(build: (menu: SideMenuElement<Uses>) => SideMenuElement<Uses>): SideMenuElement<Uses> | Modifiers for Android only. |
| options | options(options: OptionsSideMenu): SideMenuElement<Uses> | Options of the side menu no modifier covers. The options of screens go on the screens. |
SideMenuParts
The parts of a side menu: a screen named alone is a screen in a menu, and gets a stack in the center.
interface SideMenuParts
| Member | Type | Description |
|---|---|---|
| left | LayoutContent | |
| centerRequired | LayoutContent | |
| right | LayoutContent |
SideMenuSide
The settings of one side of a side menu, the same type for sideMenu.left and sideMenu.right. The left menu opens from the left edge and the right menu from the right edge, also in right-to-left layouts. Only one menu is open at a time: opening one closes the other. The settings apply when the side menu is created, each time a screen of the side menu appears (then all of them anew, with the defaults named below), and at once when they arrive in mergeOptions (then only the fields that arrived). A value from a screen of the center holds while that screen is on top of the center, and afterwards the value of the side menu's own options or the default holds.
interface SideMenuSide
| Member | Type | Description |
|---|---|---|
| visible | boolean | Whether the menu opens ( |
| animate | boolean | Whether the opening or closing that |
| enabled | boolean | Whether the user can open the menu with a gesture. With |
| width | number | The width of the menu, in points on iOS and dp on Android. It is capped at the width of the side menu (iOS) and at that width less 64 dp (Android). A change in |
| height | number | The height of the menu in dp; a menu lower than the container is pinned to the top. A change in |
| shouldStretchDrawer | boolean | Whether a finger can pull the menu out past its width. With |
| animationVelocity | number | The speed in points per second with which the menu moves to its open or closed place. A menu released faster than this moves at the speed of the finger, and the move takes 0.1 seconds at the least. A value of |
| openMode | 'aboveContent' | 'pushContent' | Where the menu is relative to the center. |
| glass | boolean | (iOS 26+) Whether a Liquid Glass layer fills the menu's container, under its screen. The glass shows through only where the screen is transparent, so the screen needs |
| testID | string | The test identifier of this side's container; while the menu is open, the dimming over the center is |