Page layouts

PageLayoutControl · SplitterControl · DashboardLayoutControl · GridLayoutControl · StackLayoutControl

Lay out an app shell with collapsible panels, a splitter and a dashboard of tiles.

Overview

Blazor layout controls divide a page: PageLayoutControl adds collapsible side panels, SplitterControl a draggable bar between two panes, and DashboardLayoutControl a grid of tiles. Use them for an app shell with navigation and detail panes, or a dashboard of KPI cards; inside a panel, GridLayoutControl and StackLayoutControl write a CSS grid or a flex row from their parameters.

Examples

#Application shell: panels and a splitter

Hide a side panel with the two sidebar buttons beside the detail heading, drag the splitter or move it with the arrow keys; the panels are wired together, so click around.

Navigation

Requests

KYO-0001 Thistlewood

Kyoto long weekend · 6 lines · Draft · $4,860 · last saved today at 9:12 AM

Properties

Traveler
Juniper Thistlewood
Status
Draft
Lines
6
Total
$4,860
List pane 200 px, 0 commits · navigation shown, properties shown

#Dashboard grid

Click a KPI card, such as Bookings, to expand it across the row; each panel is placed by Row, Column, SizeX and SizeY.

42
Bookings
↑ +5.0%
$89K
Revenue
↑ +13%
67
Quotes sent
↑ +12%
Bookings by day
0246810 MonTueWedThuFriSatSun
Bookings by destination
Lisbon
Kyoto
Amalfi
Cape Town
Three KPI cards on rows 0–1, charts on rows 2–4.

#Grid and stack layouts

Change the column count; at 600 px or narrower the grid drops to one column, and the switch turns wrapping off in the services stack.

Lisbon Explorer

DestinationLisbon, Portugal
RegionSouthern Europe
Nights7
SeasonSpring
Group sizeUp to 12
DepartsSaturdays
Included
Airport transfersSeven nights in a guesthouseOld-town walking tourSintra day tripFado evening with dinnerCity transport pass
Columns repeat(3,minmax(0,1fr)) · wrap on · Spring departure, no place held

Documentation

ParameterTypeDefaultDescription
PageLayoutControl.Heightstring?"100%"Height of the flex row; panels fill it.
PageLayoutControl.CssClassstring?nullExtra classes on the row.
Left/RightPanelControl.Widthstring?"250px"Panel width when open.
Left/RightPanelControl.CollapsibleboolfalseRenders a 20px collapse tab just outside the panel's inner edge. In the current version the panel's own overflow clips that tab, so it cannot be seen or clicked; the example leaves it off and hides the panels through Collapsed.
Left/RightPanelControl.CollapsedboolfalseCollapsed state; true sets the panel's width to 0. Two-way with @bind-Collapsed, and works without Collapsible.
CenterPanelControl—Takes the remaining width. Only CssClass and content.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.