NavVis IVION API
    Preparing search index...

    Interface TopBarServiceInterface

    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.

    interface TopBarServiceInterface {
        items: TopBarItemInterface[];
        closeMenu(): Promise<void>;
        getActiveItem(): TopBarItemInterface;
        goToItem(item: TopBarItemInterface): Promise<void>;
        goToRoot(): void;
        openMenu(): Promise<void>;
    }
    Index

    Properties

    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:

    • Adding new items in any place of the tree
    • Updating existing items
    • Deleting existing items

    Methods

    • Hides the active item's dropdown panel.

      The active item stays active, so the panel can be brought back with openMenu.

      Returns Promise<void>

    • 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.

      Parameters

      Returns Promise<void>

      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.

      Returns void

    • Shows the active item's dropdown panel.

      Note: does nothing when no item is active (see getActiveItem).

      Returns Promise<void>