Skip to Content
CMSLayout

CMS layout

AdminLayout

The full admin shell: top navbar + sidebar navigation + breadcrumbs + content. Composes ui’s AppShell, Navbar, Sidebar and Breadcrumbs.

import { AdminLayout, UserMenu, NotificationCenter } from '@gg-software/cms'; <AdminLayout brand={<Logo />} sections={[ { title: 'Shop', items: [{ key: 'orders', label: 'Orders', icon: <OrdersIcon /> }] }, { title: 'Settings', items: [{ key: 'team', label: 'Team' }] }, ]} activeKey="orders" onNavigate={(key) => router.push(`/${key}`)} breadcrumbs={[{ label: 'Home', href: '/' }, { label: 'Orders' }]} headerActions={ <> <NotificationCenter notifications={notifications} /> <UserMenu user={{ name: user.name }} onLogout={logout} /> </> } > <PageContent /> </AdminLayout>;
PropTypeDefaultDescription
children*ReactNodepage content
brandReactNodebrand shown in the top navbar
sections*SidebarSection[]sidebar navigation sections (ui Sidebar shape)
activeKeystringkey of the active navigation item
onNavigate((key: string) => void)called when a navigation item without `href` is selected
breadcrumbsBreadcrumbItem[]breadcrumb trail rendered above the content
headerActionsReactNoderight side of the navbar (UserMenu, NotificationCenter, …)
sidebarCollapsedbooleanfalsecollapse the sidebar to icons
sidebarWidthstring | number240
classNamestring

* required · generated from packages/cms/src/layout/AdminLayout.tsx

Orders

All orders across your shops.

<PageHeader title="Orders" description="All orders across your shops." breadcrumbs={[{ label: 'Home', href: '/' }, { label: 'Orders' }]} actions={<Button variant="primary">New order</Button>} />
PropTypeDefaultDescription
title*ReactNode
descriptionReactNodemuted line under the title
breadcrumbsBreadcrumbItem[]trail rendered above the title
actionsReactNodeprimary actions, right-aligned (buttons, menus)
classNamestring

* required · generated from packages/cms/src/layout/PageHeader.tsx

ui’s Sidebar plus pinned header and footer areas — for AdminLayout’s sidebar slot when you need a brand block or a bottom area.

Acme Admin
<NavSidebar header={<Logo />} footer={<Version />} sections={sections} activeKey={active} onSelect={setActive} />
PropTypeDefaultDescription
sections*SidebarSection[]grouped navigation (ui Sidebar shape)
activeKeystring
onSelect((key: string) => void)called when an item without `href` is selected
headerReactNodebrand/logo area pinned to the top
footerReactNodepinned bottom area (user, version, collapse toggle)
collapsedbooleanfalse
classNamestring

* required · generated from packages/cms/src/layout/NavSidebar.tsx

UserMenu

<UserMenu user={{ name: 'Ada Lovelace', email: 'ada@acme.io', avatarUrl: '/ada.jpg' }} items={[{ key: 'billing', label: 'Billing', onClick: openBilling }]} onProfile={() => router.push('/profile')} onLogout={logout} />
PropTypeDefaultDescription
user*UserMenuUser
itemsMenuItem[][]extra items rendered above the sign-out item
onProfile(() => void)
onLogout(() => void)
compactbooleanfalsehide the name/email next to the avatar (avatar-only trigger)
classNamestring

* required · generated from packages/cms/src/layout/UserMenu.tsx

NotificationCenter

<NotificationCenter notifications={items} onSelect={(n) => open(n)} onMarkAllRead={() => markAllRead()} />
PropTypeDefaultDescription
notifications*NotificationItem[]
onSelect((notification: NotificationItem) => void)called with the clicked notification
onMarkAllRead(() => void)shows a "Mark all read" action when provided
emptyTextReactNodeNo notifications
maxHeightnumber320max list height before scrolling (default 320)
classNamestring

* required · generated from packages/cms/src/layout/NotificationCenter.tsx

DashboardLayout

Responsive widget grid (see Dashboard for StatCard/KpiGrid).

Revenue128 400 Kč+12.5%
Orders1 203-2.1%
Visitors48 210+5.4%
<DashboardLayout minWidgetWidth={280}> <StatCard /> <Panel title="Sales"><LineChart data={sales} /></Panel> </DashboardLayout>
PropTypeDefaultDescription
children*ReactNodedashboard widgets (StatCard, charts, panels, …)
minWidgetWidthstring | number280widgets auto-fill columns at least this wide (default 280)
gapSpaceValuemd
classNamestring

* required · generated from packages/cms/src/layout/DashboardLayout.tsx