@minisource/app-shell
v0.1.11
Published
Shared admin panel shell layout used by auth/front, notifier/front, storage/front, and payment/front.
Readme
@minisource/app-shell
Shared admin panel shell layout used by auth/front, notifier/front, storage/front, and payment/front.
Installation
pnpm add @minisource/app-shellComponents
AppShell- Main layout wrapper (Sidebar + Topbar + Content + Footer)MobileSidebar- Overlay sidebar for mobile viewportsSidebar- Navigation sidebar with collapsible groupsTopbar- Header bar with left/right slotsFooter- Bottom footerUserMenu- User avatar + dropdown menu
Types
NavItem {
id: string;
label: React.ReactNode;
href?: string;
icon?: React.ComponentType<{ className?: string }>;
children?: NavItem[];
badge?: React.ReactNode;
disabled?: boolean;
}Usage
import { AppShell, Sidebar, Topbar, Footer, UserMenu } from '@minisource/app-shell';
function AdminLayout({ children }) {
return (
<AppShell
sidebar={<Sidebar items={navItems} activeHref={pathname} />}
topbar={<Topbar title="Dashboard" right={<UserMenu name="John" />} />}
footer={<Footer>© 2025 MiniSource</Footer>}
>
{children}
</AppShell>
);
}Architecture
This package is framework-agnostic — no Next.js, no React hooks for session/auth. All navigation data, session state, and permission logic stays in the consuming app.
