Meda Shell State
meda/meda-shell-stateFreeHook
Install a host-facing shell state provider wrapper.
Live preview
live · rendered by the registry
Rendered by @meda on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://meda.medalsocial.com/r/meda-shell-state.jsonSource
1import { ShellStateProvider, useShellState } from '@medalsocial/meda'2import type { ReactNode } from 'react'34export function AppShellStateProvider({5 children,6 searchParams,7 setSearchParams,8 activeRail = 'home',9 selectionQueryParam = 'selection',10 storageKey = 'app.side-panel.width',11}: {12 children: ReactNode13 searchParams: URLSearchParams14 setSearchParams: (updater: (current: URLSearchParams) => URLSearchParams) => void15 activeRail?: string16 selectionQueryParam?: string17 storageKey?: string18}) {19 return (20 <ShellStateProvider21 adapter={{ searchParams, setSearchParams }}22 initialActiveRail={activeRail}23 selectionQueryParam={selectionQueryParam}24 sidePanelWidthStorageKey={storageKey}25 >26 {children}27 </ShellStateProvider>28 )29}3031export { useShellState as useMedaShellState }
What it pulls in
npm packages
