Custom top bar items organized in a tree structure with an array on the root level.
The array is initially empty — the built-in top bar buttons are not part of it and cannot be modified through this API.
Supported actions that can be performed on the retrieved items structure:
Hides the active item's dropdown panel.
The active item stays active, so the panel can be brought back with openMenu.
Get the currently active TopBarItemInterface: the deepest item opened in the
top bar dropdown, or undefined when no custom item is open.
Opens the TopBarItemInterface.
Note: only works for registered items that are visible in the top bar. Opening the item
that is already active brings its dropdown panel back after a closeMenu, at the
level it was hidden on, without running the item's onClick again.
Promise that resolves when navigation has completed.
Resets the navigation of the active item's dropdown panel back to its root level, closing any open sub-item level.
Shows the active item's dropdown panel.
Note: does nothing when no item is active (see getActiveItem).
The Top Bar API enables extension of the top bar with custom items.
It offers two kinds of integration: (1) structural — shape the custom top bar content via items; (2) behavioral — drive navigation and query state on entries
A fullscreen item (see
TopBarItemInterface.isFullscreen) takes over the viewport rather than opening an anchored panel, so it can be open at the same time as another item's dropdown. The methods below then act on the dropdown, being the panel on top; the takeover keeps its own navigation underneath.