skip to the page
superthread
compositionsapp shell
system
superthread
version
2.15.1
date
24.11.26

app shell

the fleet rail, a ship's own nav and a working panel on the deep ground. the panel takes the sheet lift; the frame stays flat.

bunx --bun shadcn@latest add @mk/app-shell

serves constellation, quanta, trisys, orbit, and artifacts.

example

switch between board, direction and agents. the current link holds its box, and its count stays beside the label. ships without a destination stay unlinked.

light

dark

states

board is current, direction prints hover, agents prints keyboard focus and archive is disabled. a nav item keeps the sidebar control states.

light

dark

feet

pass foot to the nav, even as null, and its column runs to full height with a slot at the bottom. the slot holds its place while it’s empty, so a line that comes and goes moves nothing. it prints one line, only when something needs the reader. AppShellPanelFoot closes the panel with a row under a rule that reaches both edges of the sheet.

light

dark

at 900 px and below the slot steps aside with the ship’s name, and AppShellPageFoot prints the same words under the panel. print both or neither. each link in the panel’s row is a 44 px box on a phone.

light

dark

tiers

AppShellNavTier holds the pages a reader visits now and then, under a rule, in muted words. the current one prints like any current item. at 900 px and below the rule steps aside and its items join the row.

light

dark

set overflow on the nav to the words that name the tier, and at 600 px and below it sits behind a ... at the row’s end. the ... opens a list of 44 px rows, and prints selected while the current page sits behind it. open it here and pick one.

light

dark

phone

at 900 px the rail becomes a bar and the ship nav wraps below it. at 600 px the panel keeps 16 px beside its content. these frames have a 390 px viewport.

light

dark

a ship’s window scrolls what focus brings into view 16 px clear of its top and bottom, so a ring never meets the edge. the frame never covers the panel, so no nav’s height adds to it. click into a frame and press tab: each tab that scrolls in stops short of the edge with its ring whole.

light

dark

parts

AppShell
passes the current ship, links, marks and sidebar to the fleet rail. the specimen holds its viewport inside a bounded frame.
AppShellNav
holds the ship name and its named nav, with an optional foot and overflow. each AppShellNavItem takes a number, a live count and the app's link or button.
AppShellNavTier
the nav’s quiet second tier, a list of AppShellNavItems. it sits after the first tier and before a QuickAddNav, so on a phone the row reads first tier, add, ....
AppShellGround
is the page's main, named workspace, with id="main" for the rail’s skip link, and leaves the gutter around AppShellPanel, the raised working surface. inside a layout that already owns main, render a div and pass role="group" to AppShellNav. the panel takes render too, so a hand-built main needs no wrapper.
AppShellPanelFoot
the panel’s last row. a span prints as the muted lead word, and links read as chrome. render a named nav for a row of links.
AppShellPageFoot
the nav’s foot line, 900 px and below, last in the ground. pass it what foot holds. empty, it takes no room.