app-shell-01
The shell reference — AppShell landmarks and skip link, a rail with search, inbox count, grouped links and a user menu, and linked stat tiles.
Last updated
What it is
The application shell reference — AppShell's landmarks and skip link, a rail with search, inbox count, grouped links and a user menu, and a page of linked stat tiles. It is a block: you pull it once with shadcn add, and then you own it —
nothing re-pulls it and no integrity hash tracks your edits, unlike the components it composes.
It is the one shell and sidebar reference: every recipe a rail needs is in components/app-sidebar.tsx.
Install
npx shadcn@latest add @vegastack/app-shell-01This installs the block's own files plus the components it composes: app-shell, avatar, breadcrumb, button, card, collapsible, command, dropdown-menu, item, kbd, page-header, provider, sidebar, stat, use-platform.
Preview
The rail
- Workspace menu — the header row is a real
DropdownMenutrigger ("Workspace: Acme") with a radio group of workspaces. - Search — an outline row that opens a palette on click or on ⌘K / Ctrl+K. The hint is
formatShortcut(["mod", "K"], os)fromuse-platform, markedaria-hidden, and the chord is on the button asaria-keyshortcuts, so the name stays "Search". Swap the palette forcommand-search-01when you have search. - Inbox —
badgeandbadgeLabelonSidebarMenuButton, so the row is announced as "Inbox 3 unread" and the visual count is decoration. - Grouped links under
SidebarGroupLabels.isActiveon a link row setsaria-current="page". - Coming soon — a collapsible row: the
Collapsiblerenders as theSidebarMenuItem, so the menu list keeps only list items, and the row'sCollapsibleTriggercarriesaria-expanded. - User menu — the standard account menu. The footer trigger shows the avatar, name and role;
the menu header repeats that row with the email in place of the role. Then Profile and Settings,
a Theme submenu (
DropdownMenuSub) whoseDropdownMenuRadioGroupoffers Light · Dark · System with Sun · Moon · Monitor icons and a check on the active one (throughuseVegaStackTheme), Keyboard shortcuts, a separator, and Sign out. Every item has an icon.
The page
AppShellContent › AppShellPage › PageHeader h1 › linked stat tiles (the stat.mdx "Linked
stat tiles" recipe): each count is a whole-tile link to the list it counts, named label first
("Overdue tasks 3").
No flash on a static shell
A statically rendered shell can't read the sidebar cookie on the server. Put SidebarStateScript
in the root layout's <head>: it marks the collapsed state before first paint, so the rail doesn't
flash open.
import { SidebarStateScript } from "@/components/ui/sidebar";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<SidebarStateScript />
</head>
<body>{children}</body>
</html>
);
}Files
| File | Registry type | Target |
|---|---|---|
app-shell-01/components/app-sidebar.tsx | registry:component | app/app-shell-01/components/app-sidebar.tsx |
app-shell-01/page.tsx | registry:page | app/app-shell-01/page.tsx |