Skip to content

Menu

The menu component is a core navigation element for AR/VR applications. It provides users with a clear and accessible way to move between different sections or trigger actions within your experience.

Examples

Basic Menu

This example demonstrates a default menu using a grid layout with custom background and item colors. Each item includes an icon, title, and text color, allowing you to fully customize the visual appearance.

Circle Layout

This example demonstrates the menu in a circular layout, which is well-suited for immersive AR/VR interactions where radial navigation feels more natural and intuitive.

A central logoicon is displayed to provide visual context or branding. When the logo is clicked, the component emits a logo event, allowing user to handle custom actions such as navigation, closing a main menu, or triggering other application logic.

When the number of menu items exceeds six, the component automatically switches to displaying icons only to maintain clarity and prevent visual clutter in the circular arrangement.

Custom Grid Layout

This example shows how the grid layout can be customized by changing the number of columns using the menu's gridcolumns property.

The first menu uses three columns (gridcolumns="3"), resulting in a horizontal layout with individually styled items. The second menu uses a single column (gridcolumns="1"), creating a vertical list with a unified color theme. It also demonstrates the use of activecolor for interaction feedback.

Props

PropertyTypeDefaultDescription
visiblebooleantrueControls whether the menu is visible in the scene.
sizeenum (small, medium, large)mediumDefines the overall size of the menu, affecting spacing, icon size, and text scaling.
positionnumber[]0 0 0Sets the position of the menu in 3D space (x, y, z).
colorstring (blue, #fff)#0091E3Base color of the menu, applied to background and elements.
activecolorstring(red, #fff)#C1080CColor applied to an item when it is active or selected.
itemopacitynumber1Controls the opacity of individual menu items.
menuopacitynumber1Controls the transparency of the entire menu, including its background.
itemsstring (JSON)""Defines menu items. Each item can include icon, title, color, and textColor. Example: [{ "icon": "home.svg", "title": "Home", "color": "red", "textcolor": "white" }].
clickablebooleantrueEnables or disables interaction with menu items.
layoutenum (circle, grid)gridDetermines how menu items are arranged (grid or circle).
gridcolumnsnumber2Specifies the number of columns in grid layout.
backbuttonbooleanfalseDisplays a back button in the center of the menu (useful for navigation hierarchies).
logoiconstring (image url or asset ID)""Displays a logo icon in the center of the menu.
showtextbooleanfalseToggles visibility of item labels (titles).

Events

The menu component emits the following events when interacted with:

EventParametersDescription
select{ item: object }Emitted when a menu item is clicked. Returns the full item object (e.g. icon, title, color, textcolor).
back-Emitted when the back button is clicked (when backbutton is enabled). Typically used for navigation within menu hierarchies.
logo-Emitted when the center logo icon is clicked. Useful for triggering global actions such as navigating to a home view.