useSidebar
Global state management for an application sidebar, handling both desktop collapse state (persisted) and mobile drawer state.
Install: pnpm add-composable useSidebar
Sidebar controls
Interact with the global sidebar state.
API
collapsed(Ref<boolean>): Persisted state for the desktop sidebar collapse.mobileOpen(Ref<boolean>): State for the mobile drawer visibility.isExpanded(ComputedRef<boolean>): Inverse of collapsed.toggle(() => void): Toggles the desktop collapse state.toggleMobile(() => void): Toggles the mobile drawer.closeMobile(() => void): Closes the mobile drawer.