crucıble

Gantry

App shell block: a workspace switcher, sectioned sidebar nav with height-animated nested groups, an active pill that slides between items, Tally badges that roll on change, a pinned footer card and a user menu; the sidebar springs between full width and an icon rail (toggle or `[`) with label flyouts and nested flyout menus; the topbar carries breadcrumbs, a ⌘K manifest command palette and a tocsin notifications bell; under 720px of container width the sidebar becomes a swipe-to-close drawer with a focus trap. Controlled collapsed / activeId, skip link and a <main> landmark.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/gantry

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
brandstring"Lumen"Product name — shown under the workspace name when the workspace has no plan.
logoReact.ReactNodeSquare mark used for workspaces without their own logo.
workspacesGantryWorkspace[]three sample workspacesWorkspaces in the switcher. With one workspace (and no onCreateWorkspace) the switcher is a static header.
workspaceIdstringControlled current workspace id.
defaultWorkspaceIdstringthe first workspaceInitial workspace when uncontrolled.
onWorkspaceChange(id: string) => voidFires when a workspace is picked from the switcher.
onCreateWorkspace() => voida no-op in the sampleShows "Create workspace" in the switcher.
sectionsGantrySection[]a sample product navSidebar nav, grouped into sections.
activeIdstringControlled active nav item id.
defaultActiveIdstring"relaunch" (sample) or the first itemInitial active id when uncontrolled.
onNavigate(id: string, item: GantryNavItem) => voidFires when a nav item (or a "Go to" command) is chosen.
collapsedbooleanControlled rail mode. Pair with onCollapsedChange.
defaultCollapsedbooleanfalseInitial rail mode when uncontrolled.
onCollapsedChange(collapsed: boolean) => voidFires whenever rail mode changes (toggle button, [ key, handle).
userGantryUsera sample userSigned-in user (bottom chip).
userMenuGantryMenuItem[]Profile / Settings / Sign outUser menu entries.
onUserMenuSelect(id: string) => voidFires when a user-menu entry is chosen.
breadcrumbsGantryBreadcrumb[]derived: workspace / parent / active itemTopbar breadcrumbs.
footerReact.ReactNodea sample usage cardPinned card above the user chip (usage meter, upgrade CTA…). null hides it.
actionsReact.ReactNodeExtra topbar controls, rendered before the notifications bell.
notificationsOmit<TocsinProps, "ref" | "inline"> | falseProps forwarded to the tocsin notifications bell, or false to hide it. Its accent defaults to accentColor.
commandsManifestItem[]Extra ⌘K palette commands (forwarded to manifest). "Go to" commands for every nav item are always included.
searchLabelstring"Search…"Search trigger label.
searchPlaceholderstring"Search pages and commands…"Placeholder inside the palette.
hotkeysbooleantrueGlobal shortcuts: ⌘K opens search, [ toggles the sidebar (ignored while typing).
childrenReact.ReactNodea sample placeholder pagePage content, rendered in the scrollable <main> region.
mainClassNamestringClasses for the scrollable <main> region.
accentColorstring"#c4b5fd"The single accent: active pill bar, badges, focus rings, current workspace tile. Hex gets auto black/white ink.
refReact.Ref<GantryHandle>Imperative handle — collapse(), expand(), toggle(), openSearch(), replay().
classNamestringClasses for the root (give it a height, e.g. h-[600px] or h-dvh).
styleReact.CSSPropertiesInline styles for the root.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.