Components / cms-shell
Admin layout
Sidebar with collections, API keys and audit log, plus extraNav for your app's own screens. A sheet menu under 768px. Shows "Media" when the app has a media library.
With the shadcn CLI
npx shadcn add https://agent-cms-docs.vercel.app/r/cms-shell.jsonWith the agent-cms CLI
npx @mainsoft/agent-cms add cms-shellLive demoRuns on a demo database that resets every 30 minutes.
posts
| Title | Category | State | Last edited | Views (7 days) | Actions |
|---|
Loading…
Usage#
<CmsShell title="Admin" LinkComponent={Link} activeCollection="posts" extraNav={[{ label: "App", items: [{ label: "Reports", href: "/admin/reports" }] }]}>
{children}
</CmsShell>Pass LinkComponent={Link} so links use your router, and extraNav for your own screens. Under 768px the sidebar becomes a sheet menu.
Install#
npx @mainsoft/agent-cms add cms-shellIt also needs CmsProvider from cms-lib around your admin:
<CmsProvider baseUrl="/api/cms">{children}</CmsProvider>