Licence
MIT
Version
0.6.3
Deps
0
Size
153 kB
Vulns
0
Weekly
0
@nubitio/admin
Admin shell layout for Nubit apps: responsive sidebar with nested menus, header with action slots, and screen-size utilities.
Install
npm install @nubitio/adminPeer dependencies
"react": "^19",
"react-dom": "^19",
"react-router-dom": "^6"Usage
import { AdminShell } from '@nubitio/admin';
import '@nubitio/admin/style.css';
const menu = [
{ text: 'Dashboard', icon: 'ph ph-house', path: '/' },
{
text: 'Catalog',
icon: 'ph ph-package',
items: [
{ text: 'Products', path: '/products' },
{ text: 'Categories', path: '/categories' },
],
},
];
export function App() {
return (
<AdminShell title="My Admin" menuItems={menu}>
{/* routed content */}
</AdminShell>
);
}Exports
AdminShell— full layout: sidebar + header + content areaAdminHeader— standalone header with action slotsAdminSidebarMenu— standalone sidebar menuuseScreenSize/useScreenSizeClass— responsive breakpoint helpers
License
MIT