Skip to content

App frame

One layout with pieces left out. Copy the variation you need; the code is yours to change. The gap around the pane is --app-frame-gap, and on a phone the page is flat and the rail becomes a drawer.

Where the pane scrolls by itself, two hooks from @windmorph/react/primitives make it behave as a page does. useScrollKeys sends Page Down, End, Space and the arrows to the pane even with nothing focused, and makes it a Tab stop only on a page with no links or controls of its own, so a text-only page can still be reached from the keyboard. useScrollRestoration brings the pane's scroll position back on back, forward and reload, which browsers do only for the window: pass it your router's path and query as pageKey (in Next.js, usePathname() and useSearchParams()). A new key starts the pane at the top, so a change of the query alone does too: leave out of the key the parts that shouldn't, such as a filter.

Public

A top bar and a flat, full-width page, for pages anyone can see.

App

Adds a rail with flyouts, and the page becomes a rounded pane.

Full

Adds a side panel rail, whose item opens a standard side sheet beside the pane.

Pinned second nav

The current section’s links stay open beside the page. Click between pages with and without them.