Skip to main content
  1. Docs
  2. Components
  3. Console frame

App shell

The frame of a Qeet console: the scope bar, the navigation, the page, and panels on the end edge.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.4
Renders
<main>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

app-shell.tsx
// Experimental: from the package's experimental entry, until it's stable.
import { AppShell, useAppShell } from "@qeetrix/react/experimental";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
topBarReactNode—The global bar: a TopBar.
sidebarReactNode—The navigation: a Sidebar.
drawers{ id, label, icon, content, badge?, width?, resizable? }[]—End-edge panels; their triggers sit in the TopBar. width, 320 by default; resizable, a splitter on its start edge.
activeDrawer · defaultActiveDrawer · onActiveDrawerChangestring | nullnullThe open panel's id.
sidebarCollapsed · defaultSidebarCollapsed · onSidebarCollapsedChangebooleanfalseThe rail. Persist it in the user's settings.
bannersReactNode—Page banners: Alerts with variant="banner".
notificationsReactNode—Page messages, above the page header.
density"compact" | "default" | "comfortable" | "inherit""compact"The frame's density: consoles are dense.
mainIdstring"main"The main region's id, for the skip link.
embeddedbooleanfalseA shell inside a page, a preview: it fills its box, with no <main> or skip link; its layout follows the box.
useAppShell(){ collapsed }—The shell's state, for content in its bar or sidebar.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
app-shell<div>The frame; 100dvh tall.
app-shell-top<div>The bar.
app-shell-nav<div>The navigation column, sticky.
app-shell-collapse<button>Collapse, or Expand.
app-shell-main<main>The page; a <div> when embedded.
app-shell-panel<aside>An open panel; a drawer under 1200px.

04

Around your routes

Put the shell in the root layout, so it survives navigation and the rail keeps its state.

routes/__root.tsx
export const Route = createRootRoute({
  component: () => (
    <AppShell topBar={<ConsoleTopBar />} sidebar={<ConsoleSidebar />} drawers={drawers}>
      <Outlet />
    </AppShell>
  ),
});
Next — App shellAccessibility