sidebar
Last updated
Last updated
This UI component displays a sidebar with items on the left side of the screen on desktop and tablets, to indicate to the user how far they are progressing with a process.
Sidebar hidden by default on small screens
By default the sidebar is not shown if the app is used on devices with smaller screens (< 768px). This behavior can be changed in its configuration.
The text contained inside the <sidebar>
tag can be a formatted string, meaning that you can make the text dynamic.
Sidebar Priority
The sidebar must be the first component listed in the View XML.
Option | Required | Details |
---|---|---|
| optional | Specifies the position of the sidebar. Can be |
| optional | Function which returns an array of |
| optional | Boolean indicating whether or not to show the sidebar on mobile. Can be either "true" or "false". Defaults to "false" |
Option | Required | Details |
---|---|---|
| optional | The way the sidebar item is visually rendered, to indicate to the user whether they have already completed the step indicated by the sidebar item in a process. It can be one of the following:
In other words, exactly one field should be |
| optional | Path of the icon to display on the sidebar item, left of the text. Icons can be uploaded using the Assets workspace in OXIDE. |
| optional | Sets the icon's color. Can be a named color, like |
| optional | |
| optional | The opposite of |
| optional | Function to call when the item is pressed - either a JavaScript/TypeScript function or a navigation function.
Note: Adding |
| optional | The Ionicon to display on the right-hand-side of the item, typically denoting the action.
Defaults to |
| optional | Whether to run field validation before calling the associated |
Version compatibility
The feature to generate sidebars dynamically was introduced in version 4.38.5 of the JourneyApps Container.
The function in items=
must return an array of component.sidebarItem
objects. component.sidebarItem
has the following properties:
Implicit show-if
and hide-if
Note that the items specified above do not have showIf
or hideIf
fields. All items added to the array will automatically be shown. In order to hide an item, omit it from the returned array.
Controls whether the sidebar item is hidden or shown. The argument specified to show-if
can either be a literal boolean value (true
or false
), or it can specify a variable, parameter or field that can be a string, number, object, etc. that evaluates to false or evaluates to true (see the reference documentation for and for further details)