The Navigation Menu screen component provides users with a horizontal list of Navigation Menu Elements, which can e.g. act as links to different screens / pages:

You define the exact functionality of each Navigation Menu Element by assigning an Action(s) that is triggered when a user clicks on the menu element. In addition, the styling of the Navigation Menu and the Navigation Menu Elements can be set individually using dedicated 'Style' Business Objects available for each of the components.
The horizontal Navigation Menu adapts to smaller screen sizes, always keeping the selected menu element visible and making menu elements for which there is no space accessible via a drop-down:

Note: On mobile devices, only the selected menu element is shown and the drop-down is rendered in full page view.
Follow these steps:
- In the Screen editor, use one Navigation Menu and nest the required amount of Navigation Menu Elements inside:

In general, it is recommended to place the Navigation Menu component towards the top of your Screen, e.g. within a Layout Container component where the Children Direction property is set to horizontal. - Define the properties of the Navigation Menu and set a 'Style' Business Object to define the appearance of the Navigation Menu.
- Define the properties and Action(s) of each Navigation Menu Element. In addition, set a 'Style' Business Object to define the appearance of the Navigation Menu Element.
Note: The 'Style' Business Object defined for the Navigation Menu Element is not only assigned to the menu entry, but also to its “clone” entry appearing in the
Popup component displayed on smaller screens (e.g. mobile devices).
The Navigation Menu component has the following properties:
- Active Element HTML Id – Determines which Navigation Menu Element is active (selected) by default.
Enter the 'HTML Id' of the according Navigation Menu Element. If no value is specified here, the first Navigation Menu Element is selected.
Follow these steps to configure a Navigation Menu Element:
-
Define the properties:
- Label – Sets the text displayed in the Navigation Menu for this menu element.
- HTML Id – Sets the HTML Id of the component.
-
Define one or more Actions on the Actions tab to specify what happens when a user clicks on the Navigation Menu Element. The typical use case of the Navigation Menu is linking to other Screens, use the Display Screen Action for this purpose.
The following procedure describes how to create a Navigation Menu which can be reused in multiple screens to save development time. In this scenario, you have four Screens, and want the Navigation Menu with links to each of the Screens to be available in every Screen.
Follow these steps:
- Create a Screen called NavigationMenuInclude containing a Navigation Menu component.
- In the NavigationMenuInclude Screen, create a variable called
$activeEntry of the type 'assigned'. Assign this variable to the Active Element HTML Id property of the Navigation Menu component using the expression editor.
Using a variable allows changing the active (highlighted) entry according to the current Screen being displayed. - In the NavigationMenuInclude Screen, add four entries (Navigation Menu Element components) to the Navigation Menu. For each:
- Set a Label indicating the Screen it should link to.
- Assign a
Display Screen Action to create a link to the according Screen. - Set an HTML Id for the entry.
- On each of the four Screens referenced by an entry in the Navigation Menu:
- Insert an Include component and select the NavigationMenuInclude Screen created in step 1 to include the Navigation Menu in the Screen.
- In the Variables Assignment tab of the Include component, assign the HTML Id of the Navigation Menu Element pointing to the current Screen to the
$activeEntry variable.
For design suggestions, see the Navigation Menu section of design.appway.com.