Layout

5 components

The components that hold a view together: the page frame, the navigation shell, and the splitter that divides one working area into two. Each live preview is clipped into a fixed-height frame, because these are normally full-viewport surfaces.

Split panes

NkSplitPane divides a container into a primary pane whose size you control and a secondary pane that absorbs the rest. react-aria ships no splitter, so this one is hand-rolled against the WAI-ARIA Window Splitter pattern.

NkSplitPane

list + logs

The case the component was built for: a list you scan and a panel you read, where the right split depends on what you are doing. Pick api-billing and the log panel earns its width; pick nothing and the list does. Drag the bar, fold it with the round button, or double-click to reset.

orientation
Live · horizontal · resize the bar
Services
8
Logsapi-billingproduction
10:38:55 stripe webhook signature verified
10:39:01 warn invoice.payment_failed cus_Qh2f... retry 1/3
10:39:01 warn replica 2 failed readiness probe (timeout 5s)
10:40:12 error connect ETIMEDOUT 10.0.3.14:5432
10:40:12 info falling back to read replica
10:41:44 warn degraded: 1/2 replicas ready
orientation prophorizontal
aria-orientation—
size34%
aria-valuenow—
aria-valuemin / max—
collapsedfalse

Watch the two top readouts disagree, deliberately. The orientation prop is named after how the panes are laid out, matching every other splitter library; ARIA's aria-orientation describes the separator itself. Side-by-side panes are divided by a vertical bar, so orientation="horizontal" correctly emits aria-orientation="vertical". Reviewers file this as a bug roughly every time; it is not one.

NkSplitPane

keyboard model

The bar is a real role="separator" with tabindex=0, so the whole component is operable without a pointer — which is the half most splitter implementations skip. Sizes are percentages, so a persisted split is still meaningful after the window resizes.

Tab to the bar, then use the keys below
request

POST /api/v1/deploy

{ "env": "production" }

response

202 Accepted

{ "job": "dep_8f21c4" }

← / →resize by step (2%)
Shift + ← / →resize by largeStep (10%)
PageUp / PageDownresize by largeStep
Home / Endjump to the bounds
Enterfold / restore
Escapecancel a drag in progress
double-clickreset to defaultSize
size50%
bounds20% / 80%
last keyfocus the bar

NkSplitPane

bounds · collapse · disabled

minSize/maxSize bound the primary pane; secondaryMinSize/secondaryMaxSize bound it from the other side and are resolved into one effective pair, so the ARIA values, the drag clamp and Home/End can never disagree.

minSize=25 · secondaryMinSize=40the secondary pane's floor tightens the primary pane's ceiling to 60%
Bounded
primary · 25–60%
secondary · ≥40%
collapsible · collapsedSize=0fold with the bar button, with Enter, or from outside
Foldable
inspector
canvas
isDisablednot focusable, not draggable — the divider stays as a rule
Frozen
fixed
content

storageKey is deliberately omitted from every specimen on this page: persistence is opt-in and the component never touches localStorage unasked. Pass it in a real view and the size is stored under nk-split:<key>.

Page frame

The two wrappers every view in the Hub, admin and account apps start with. This showcase page is built out of them.

NkViewHeader

title · subtitle · actions

The standard view header: a subtitle above, a title, and a right-aligned actions slot that wraps under the title on narrow viewports rather than overflowing.

title + subtitle + actions

Dashboard

NkViewContainer

mount animation

Wraps a view in the standard entry motion — a short fade and rise on first mount, using the shared duration and easing tokens. It adds no padding and no width cap of its own.

children
This block faded and rose on mount. Reload to see it again.

Application shell

The navigation surface and the shell that composes it with a scrollable main area. Both are shown live, clipped into a frame.

NkSidebar

fold · sub-sections · flat active

The two-level rework, instrumented. Click a section title to fold it — collapsible defaults to true whenever a title exists and defaultOpen to true, so every nav built before this still renders open. Fold state is persisted per section id in localStorage under nk-sidebar-folded. A NkNavSubSection is the level-2 group: discriminated from a nav item by 'items' in entry, indented behind a 1px rail, its row a container that folds but never navigates — and flattened to plain icons when the rail collapses to an icon strip. The selected row is the new flat + rounded state: solid bg-aura-cyan/10 on rounded-md, no gradient, no left stripe (specs/DESIGN.md §6 bans accent stripes wider than 1px).

drive activeTab
Live · click a section title to fold · scroll the nav
activeTabpg-dashboard
fold map · localStoragenk-sidebar-folded

Fold Observability by clicking its title, then press alerts above: you cannot click an item inside a folded section, so navigation can only land there from outside — and the fold opens itself when activeTab changes, otherwise the highlight would be invisible. Same move with postgres opens two levels at once: the section, then the Datastores sub-section.

The nav is the scroll region — flex-1 overflow-y-auto with min-h-0, capped at max-h-[calc(100vh-200px)] — and this fixture is long enough on purpose to reach it, so the overflow and its scrollbar are on screen rather than theoretical. Fold state is written on every toggle (the clear button above empties nk-sidebar-folded and remounts), and below 1023px the rail auto-collapses to icons, where sub-section titles flatten away and every icon keeps its tooltip.

NkSidebar

collapsible nav

Grouped sections of nav items, each with an icon, a label and an optional badge, plus a pinned footerItems group. Fully controlled through activeTab + onTabChange; the collapsed rail persists to localStorage. Use the round chevron to collapse. Select a few rows: the highlight is the flat rounded tint above, not the old gradient-and-stripe selection.

Live shell · contained preview

Frame caveat: the collapsed-state tooltip is a fixed portal anchored to the viewport, so once collapsed the hover tooltip paints outside this frame.

NkAppLayout

the full shell

The full authenticated shell. On desktop the sidebar sits in flow; below the breakpoint it becomes a backdrop plus slide-in drawer driven by a hamburger header. The children area is the scroll container and exposes onScroll.

Live shell · contained preview
Menu

overview

The scrollable main area. Pick an item in the sidebar to change the active tab — both halves share controlled state, exactly as a real view router would wire them.

Services
12
Branches
4
Requests
1.2k

Frame caveat: this shell is normally h-screen. It is overridden to h-full here, but the mobile drawer and backdrop are fixed, so on a narrow viewport opening the menu overlays the whole page rather than just this frame.