registry
@automindzsheets 01–77shadcn 4.x
SHEET 08

Dashboard Shell

block / layout

App shell with a config-driven sidebar, mobile sheet nav, top bar slots and active-route detection.

type
block
files
1
registry deps
badge, button, sheet, tooltip, @automindz/render-link
npm deps
lucide-react

installs

  • components/automindz/dashboard-shell.tsx
  • Nav is data, not markup — pass sections and items
  • Active route from usePathname, overridable for previews
  • renderLink for client-side nav, or the rail resets on every click
  • Workspace switcher in the sidebar, under the brand
  • Collapses to an icon rail; labels move into tooltips
  • Sub-menus are data: an item with children becomes a disclosure
  • Mobile sheet carries the whole sidebar, not a reduced menu

Nav is data: pass nav sections rather than editing the component. Active route comes from usePathname(); override it with pathname in previews and tests. brand, sidebarHeader and sidebarFooter each accept ({ collapsed }) => node so they can degrade in the rail — drop @automindz/org-switcher into sidebarHeader and @automindz/user-menu into sidebarFooter. defaultCollapsed, or collapsed + onCollapsedChange to own the state. Pass renderLink on next/link — the default plain <a> full-reloads the document, which resets the collapsed rail and the open group on every click.

Variations

one state per section

01

Application shell

The workspace switcher sits under the brand in the sidebar, beside the nav it scopes; the top bar carries the breadcrumb. The user menu appears once, at the foot of the sidebar. Press Collapse at the sidebar’s foot to watch it become the rail. The width toggle really switches the layout here — placement="inline" measures the breakpoint against the frame.

fluid

Projects

Page content goes here.

02

Collapsed to a rail

Icons only, with the label in a tooltip on hover and on focus. A count becomes a dot on the icon and stays in the tooltip and the accessible name; a section label becomes a hairline rather than truncated text. brand, sidebarHeader and sidebarFooter are render-prop slots, so the wordmark, the switcher and the user menu each pick their own compact form — the shell never shrinks a node it does not own.

fluid

Inbox

Page content goes here.

04

Plan-gated navigation

Disabled items keep their place and explain their reason in a tooltip that a keyboard reaches too — the row stays focusable, so the reason survives the rail. With no breadcrumb and no page actions the top bar collapses instead of ruling an empty strip across the content — and comes back below the breakpoint, where it still has the menu trigger to hold.

fluid
Acme

No projects yet

Create your first project to see it here.