Appearance
useNavigation ​
Definition ​
Composable for navigation. Provides state for navigation trees depending on navigation type.
Basic usage ​
ts
const {  navigationElements, loadNavigationElements } = useNavigation(params);
Signature ​
ts
export function useNavigation(params?: {
  type?: Schemas["NavigationType"] | string;
}): UseNavigationReturn 
Parameters ​
| Name | Type | Description | 
|---|---|---|
| params | {
  type?: Schemas["NavigationType"] | string;
} | 
Return type ​
See UseNavigationReturn
ts
export type UseNavigationReturn = {
  /**
   * List of navigation elements
   */
  navigationElements: ComputedRef<Schemas["NavigationRouteResponse"] | null>;
  /**
   * Load navigation elements
   */
  loadNavigationElements(params: {
    depth: number;
  }): Promise<Schemas["NavigationRouteResponse"]>;
};
Properties ​
| Name | Type | Description | 
|---|---|---|
| navigationElements | ComputedRef< | null> | List of navigation elements | 
Methods ​
| Name | Type | Description | 
|---|---|---|
| loadNavigationElements | Promise<> | Load navigation elements |