Skip to content

storeCollapseNav

Overview

The store for the current collapse nav state, and persisting it.

Usage:

js
  import { storeCollapseNav } from "@vueda";
  const collapseNav = storeCollapseNav();

  collapseNav.isCollapsed; // reactive boolean for collapsed nav, true if nav is collapsed

  collapseNav.init(); // get collapse state from local storage or default based on breakpoint
  collapseNav.toggle(); // toggle collapse state

Signature

storeCollapseNav(pinia, hot)

Parameters

NameTypeRequiredDescription
piniaPinianoPinia instance to retrieve the store
hotStoreGenericnodev only hot module replacement

Returns

Store

Properties

$id

Id of the store. Used by map helpers.

Type: "collapseNav"

Source: node_modules/.pnpm/pinia@3.0.4_typescript@5.9.3_vue@3.5.27_typescript@5.9.3_/node_modules/pinia/dist/pinia.d.ts:654

Source

client/lib/stores/storeCollapseNav.js:43

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2