AppShell
The frame a whole product sits in — a rail beside a scrolling main column, with no state, no collapse and no opinion about what fills either.
Default
A rail and a main column, and nothing else — the frame owns the two-column geometry, the rail's width and the rule down its edge. What fills the slot draws content and nothing else, which is why the `WorkspaceNav` here is passed no styling at all.
Overview
Every page of the product renders here, and none of them has to know the rail exists.
Usage
import { AppShell } from '@oceanic-hub/brand-system'Reach for it when the rail never changes shape. There is no provider, no open
state, no mobile mode and nothing to persist, which is the whole reason the frame is thirty
lines and costs nothing to adopt. The moment a reader has to OPERATE the rail — collapse it,
nest it, have the app remember it — that is Sidebar, and it brings its own frame: you
replace this with it rather than nesting one inside the other. What goes IN the slot is a
third question, and WorkspaceNav is the usual answer to it.
The frame owns the rail's width, its ground and the rule down its edge, so whatever fills the
slot draws none of them. Drop a WorkspaceNav in and pass it nothing — that is the whole
composition, and the demos here show it with no styling between the two components at all. It
was not always so: the nav pinned its own w-[248px] and border-r inside this w-64
aside, so the frame every product inherits carried two hairlines eight pixels apart, and every
call site worked around it with className="w-full border-r-0". @OCE-1878 settled who owns the
edge and the workaround is now itself a bug — pass border-r-0 today and you delete the only
rule there is. The rule generalises to a rail of your own: draw content, not chrome.
It sets a height floor, not a height, and that is what decides who scrolls.
min-h-screen lets the frame grow with the main column, so a long page scrolls as one
document and the rail travels with it — right for a reading-shaped product. Give it a definite
height and the main column becomes its own scroll region with the rail pinned beside it, which
is what an app-shaped one wants. The column is a scroll container either way, so the only thing
you are choosing is whether it has a height to scroll within.
railClassName is a raw Tailwind width utility rather than a token, and that is recorded as a
softness rather than defended: a string is opaque to no-arbitrary-styles, and a width union
would have to enumerate sizes for consumers who legitimately differ.
There is no shadcn counterpart to this, and its nearest relative is a different kind of
thing. Upstream answers "what frame does my app sit in" with a dashboard BLOCK — a whole
screen you copy once — and its Sidebar is a rail SYSTEM with a provider and a
cookie-persisted collapse, which this package ships under that name. Neither is a two-column
frame you import and forget. Arriving here from upstream's Sidebar page, the component you
want is Sidebar; this is the piece you would otherwise have hand-written around it.
Rail width
railClassName is the frame's one styling seam: a Tailwind width utility replacing the default w-64. Reach for it when the rail's contents have a natural width — wide for long project names, narrow for a rail that is mostly icons — and set it once, per product.
Overview
A 208px rail. The main column takes whatever is left, and its content never has to be told how much that is.
A rail of your own
nav takes any node, so a product with four destinations never has to adopt WorkspaceNav's section-and-item model to get the frame. The prop is required rather than optional because a shell with no rail is a plain two-column layout with a border.
Overview
The frame draws the rail's ground and its right rule; everything inside the slot is yours.
Full height
The frame is min-h-screen, so by default a long page scrolls as one and the rail scrolls away with it. Give it a definite height — h-screen in a product — and the main column becomes its own scroll region with the rail pinned beside it.
Deploys
- build 4821 · production · 14:02
- build 4820 · staging · 13:41
- build 4819 · preview · 12:58
- build 4818 · preview · 12:20
- build 4817 · staging · 11:47
- build 4816 · production · 11:04
- build 4815 · preview · 10:32
- build 4814 · preview · 09:58
- build 4813 · staging · 09:12
- build 4812 · production · 08:40
A header band above the rail, and a shell that scrolls inside itself
header renders a full-width band ABOVE the aside and the content column, with no wrapper of ours — so a host's <header role="banner"> keeps its own classes and sits outside the content column, which is a different document outline from a banner nested inside main. scroll decides where the scroll lives: page (the default) lets the document grow, contain pins the shell to the viewport and moves the scroll inside <main>, which is what a product needs when something is pinned BELOW the scroll region — a dock that scrolls away with the content is a dock in the wrong place. Scroll the list: the band and the rail stay put, and only the content column moves.
API Reference
See the AppShell API page for every prop of every part, with types, defaults and the contract that pins them.
Patterns
Generic composites — the shared shell and the shared status vocabulary that make every product inherit the look. The reason this package exists.
ApprovalCard
The gate in front of an action that costs money or cannot be taken back — what it does, what it costs, who may approve it, and what becomes permanent.