import { PortalLayout, SidebarProvider } from '@hiyve/react-ui';
import { Outlet, useLocation, useNavigate } from 'react-router-dom';
function Layout() {
const { pathname } = useLocation();
const navigate = useNavigate();
return (
<SidebarProvider>
<PortalLayout
title="My App"
navItems={navItems}
currentPath={pathname}
onNavigate={navigate}
mobileNavPaths={['home', 'messages', 'profile']}
>
<Outlet />
</PortalLayout>
</SidebarProvider>
);
}
PortalLayout — responsive app shell with a collapsible sidebar on desktop and a bottom nav (plus "More" drawer) on mobile.
Works with any router — consumers provide
currentPathandonNavigateso nothing about the component is coupled to a specific routing library.