Skip to content

useNavigation

useNavigation

Composable for navigation. Provides state for navigation trees depending on navigation type.

Types

ts
export function useNavigation(params?: {
  type?: Schemas["NavigationType"] | string;
}): UseNavigationReturn

source code

ts
export type UseNavigationReturn = {
  /**
   * List of navigation elements
   */
  navigationElements: ComputedRef<Schemas["NavigationRouteResponse"] | null>;
  /**
   * Load navigation elements
   */
  loadNavigationElements(params: {
    depth: number;
  }): Promise<Schemas["NavigationRouteResponse"]>;
};

source code