Sidebar railPro
A resizable sidebar that snaps to a 64 px icon rail, with a keyboard splitter and a breadcrumb that follows the page.
oxyn add sidebar-rail- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Agent apps are no longer one chat column.
- A coding agent window holds a thread list, a transcript, a diff, a terminal, a browser preview, a file tree and a status bar at once; the user moves between them dozens of times an hour and expects the layout to stay where they left it.
- What we saw: drag-and-drop pane layout with chat, diff, browser, terminal, file, plan, tasks and subagent panes, pop-out to a window and minimize to a floating corner tile; a resizable 6-area layout (Verdent, note 03); split panes right or down, drag tabs between panes, resize dividers, layout remembered per workspace, single pane with a scrolling tab strip on phones, Cmd/Ctrl+B to swap chat and the secondary view (Hoplite, note 10); a sidebar resizable by dragging its right edge and collapsible from a top-left button (Hoplite, note 10); a rail that snaps to icon-only under ≈160 px with labels fading in ≈0.18 s [R046]; icon-anchored collapse where labels clip and icons don't move [R016]; "sidebar and side panel open/close animate without layout jumps" (Antigravity, note 08).
- The user is trying to arrange the workspace once, move through it by keyboard, and never lose a panel.
When not to use
- The prompt box for an agent, in six layouts: use Composer instead.
- Grey shapes the size of what they stand in for, one sheen sweeping across all of them in step (or a staggered pulse), shown only after a short delay, then a crossfade into the content: use Skeleton instead.
- A run as a line of checkpoints, like git for agents: use Checkpoint lanes instead.
Installation
Sidebar rail is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add sidebar-railUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Ease
Labels fade in 160 ms while the width glides over 400 ms; icons stay put.
- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Cascade
Labels drift left and fade from the top down.
- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Scrub
Labels fade as you drag, then settle to icons.
- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Rail
Folded to the icon rail.
- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Wide
Held at the 360 px maximum.
- Northline
- Projects
- Checkout redesign
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
SidebarRail
| Prop | Type | Default | Description |
|---|---|---|---|
sections | Vec<NavSection> | sample_sections() | Sections. |
active | String | "checkout" | Active row id. |
collapsed | bool | Default::default() | Start folded. |
width | f32 | 248.0 | Open width (px). |
height | f32 | 460.0 | Height (px). |
transition | String | "ease" | How labels leave on fold: `ease` (fade 160 ms while the width glides 400 ms), `cascade` (labels drift left and fade from the top down) or `scrub` (labels fade as you drag). |
childrenrequired | Element | — | Content. |
on_resize | EventHandler<u32> | — | Width changed (0 = folded to the rail). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| [ | Fold or expand |
| ←or→ | Resize by 16 px on the separator |
| Enter | Fold on the separator |
| Double-click | Fold on the separator |
Accessibility
- The separator is a focusable splitter with value and text.
- The breadcrumb follows the open page.
From the spec
- Resizer:
role="separator",aria-orientation,aria-valuenow/min/maxin px,aria-controlsthe panel, label "Resize file tree"; Enter toggles collapse and announces "File tree collapsed". - Docks: landmarks per §8; collapse buttons have
aria-expanded. - Contrast: resizer line ≥ 3:1 against both neighbours when hovered or focused (1 px resting line may be subtle; it is not the only cue — the cursor and focus ring are).
- Every drag has a keyboard path (resizer arrows, "Move tab to new split right" in the tab menu).
- Live region: layout resets and pane pop-outs are announced politely; nothing is announced during drag.
- Reduced motion: §6 last row.
Motion & interaction
- Hover intent. The cursor changes immediately; the line thickens only after 300 ms so mouse travel across a resizer never flickers it.
- Drag. Size follows the pointer 1:1, painted every frame; no easing while dragging. Content inside the resizing panel reflows live; heavy panels (diff, terminal grid) may freeze-scale their last frame during drag and reflow on release if a reflow costs > 8 ms (proposed).
- Magnets. Within 8 px of a snap point the size jumps to it with a 1 px tick on the line and, on supported trackpads, a haptic tick (macOS only, opt-in).
- Snap to rail ([R046], [R016]). Labels clip from the inline-end and fade over 180 ms while icons stay put (icon-anchored); expanding reverses with labels cascading 20 ms apart (cap 8).
- Collapse / expand via shortcut. Width animates with
spring.snap; the center's content does not slide — its scroll anchor holds (zero-jump rule) and only its width changes. - Overlay open. Dock slides in 16 px + fade with scrim fade; close reverses faster.
- Tab drag to split. Ghost tab follows the pointer at 0.9 scale with 8 px shadow; the drop region fades in (120 ms) and morphs between halves with
spring.snap; on release the new split opens from the drop edge. - Double-click reset. Size glides to default with
spring.snap. - Restore. Never animated: the saved layout is the first frame (Hoplite's "Paint from your saved session" principle, note 10).
- Corner tile minimize. Pane scales into the tile's position (
dur.travel240 ms); the tile keeps a live loader dot and a title; click restores along the reverse path.
Timing
| Transition | Duration | Delay | Easing / spring | Stagger | Frame rate |
|---|---|---|---|---|---|
| Resizer hover highlight | 120 ms in / 120 ms out | 300 ms | ease.out | — | 60 Hz |
| Drag follow | 0 (1:1) | — | none | — | display rate |
| Pixel readout tooltip | 120 ms fade | 400 ms still | ease.out | — | 60 Hz |
| Magnet tick | 80 ms line flash | — | ease.out | — | 60 Hz |
| Snap to rail: labels out / in | 180 ms ([R046] ≈0.18 s) | 0 | ease.out | 20 ms, cap 8 (in only) | 60 Hz |
| Collapse / expand (shortcut) | ~220 ms settle | 0 | spring.snap | — | 60 Hz |
| Overlay open / close | 200 ms / 160 ms; scrim 160 / 120 ms | 0 | ease.out / ease.in | — | 60 Hz |
| Drop region in / morph | 120 ms / ~180 ms | 0 | ease.out / spring.snap | — | 60 Hz |
| Split open on drop | 200 ms | 0 | spring.snap | — | 60 Hz |
| Tab fly-back on cancel | 200 ms | 0 | ease.in-out | — | 60 Hz |
| Corner-tile minimize / restore | 240 ms | 0 | ease.in-out | — | 60 Hz |
| Layout persist | debounce 500 ms | after release | — | — | — |
| Breakpoint hysteresis | 48 px | — | — | — | — |
| Reduced motion | all size changes instant; labels and overlays use an 80 ms opacity crossfade; no ghost scaling (tab ghost is a flat outline); drag still follows 1:1 (it is direct manipulation) | — | linear | none | — |
Responsive behaviour
- The frame fills the stage width; the sidebar keeps its width and the content column takes the rest.
- Below 640 px fold the sidebar to the rail with `[`.
Edge cases (spec)
- Window too small for the saved layout (laptop after an external monitor): clamp fractions to minimums in dock priority center > bottom > left > right; collapse right first; never delete the saved layout — the clamped version is a view, the saved one is restored when space returns.
- Multi-monitor / DPI change mid-drag: sizes are stored in logical px; a DPI change ends the drag.
- Corrupt or future-version
LayoutState: fall back to default + "Layout reset · Undo". - RTL: docks mirror (left dock becomes inline-start on the right); resize arrows invert so → always moves the resizer visually right; F6 order follows visual reading order.
- Tiny sizes: rails at 48 px show 20 px icons with 16 px badges; below 600 px window width there are no side-by-side splits.
- Dense IDE: 22 px tab strips, 6 px resizer hit area (still ≥ 8 px on touch-capable devices).
- Touch: 12 px hit area, long-press 400 ms on a tab to start drag; overlay docks swipe closed.
- Slow networks / remote panes: a pane whose content is remote shows its skeleton (skeletons.md) inside the restored frame; layout never waits on data.
- Very fast agents opening many panes (diff, terminal, browser in 1 s): panes open into their dock's tab strip, not as new splits; an agent never creates a split without user permission (proposed).
- Agent-opened pane while user types: the pane opens unfocused with a 1-pulse attention dot on its tab; focus stays with the user.
Notes for AI
- Import
SidebarRailfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
RailShellElinoxyn_gpui. - Props to set first:
children. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.