Skip to content

Splitter

Resizable panels with handles between them, following the WAI-ARIA Window Splitter pattern: every handle is a focusable separator you drag or move with the keyboard. Sizes are percentages you can bind, constrain, collapse, nest and save.

Styled with CSS Tailwind

Two panels

Each BitBhSplitterHandle is a role="separator" whose aria-valuenow is the size in percent of the panel before it. Drag it, or focus it and press ← / → (5 points; Shift: 20), Home / End. The handle here is a 24px hit area (w-6 -mx-3, so it overlaps the panels instead of taking space) with a 1px line and a grip inside, styled through group-data-hover:, group-data-dragging: and group-focus-visible:.

Navigation

At least 20%.

Content

At least 30%.

Sizes: 30% / 70%

Three panels, collapsible

MinSize / MaxSize bound a panel; a resize that reaches a panel's minimum moves on to the next. A Collapsible panel collapses when dragged past half its minimum, with Home, with a second arrow step at its minimum, or with Enter on a handle next to it (Enter again restores it). Collapsed panels get data-collapsed - data-collapsed:px-0 drops their padding.

Explorer

Collapsible, at least 15%.

Editor

At least 30%.

Outline

Collapsible, 12% to 35%.

Explorer: open · Outline: open

Vertical and nested

Orientation="BitBhOrientation.Vertical" stacks the panels; its handle is a horizontal bar moved with ↑ / ↓ (h-6 -my-3). A splitter nests in a panel of another (h-full); each handle belongs to its own splitter.

Files

Program.cs, App.razor, appsettings.json

Editor

Press ↑ / ↓ on the bar below.

Terminal

dotnet watch

Bound, saved and driven from code

@bind-Sizes takes one percentage per panel; OnSizesCommit fires once a drag ends or a key resizes. AutoSaveId keeps the layout in localStorage (resize, then reload). Panels take commands: CollapseAsync, ExpandAsync, ResizeAsync.

Sidebar

Document

Preview

Sizes: 25% / 50% / 25% · Commits: 0

An unhandled error has occurred. Reload 🗙