DashboardPanel
A column with a header, a scrollable body and a footer, optionally resizable between limits.
On this page
Examples
Resizable panels
Sizes are percentages shared by the panels. Each limit applies to the panel and to its neighbour.
List
Between 15% and 40%.
Detail
At least 30%. Focus a handle and use the arrow keys, Home and End.
Footer
Aside
Takes what is left.
Razor
<div class="h-72 w-full overflow-hidden rounded-xl border border-(--klyroo-border)" data-testid="dashboard-panels">
<KlyDashboardGroup StorageKey="playground-dashboard-panels">
<KlyDashboardPanel Resizable Size="25" MinSize="15" MaxSize="40" ResizeLabel="Resize list" data-testid="dashboard-panel-list">
<Header><KlyDashboardNavbar Title="List" Toggle="false" /></Header>
<Body><p class="text-sm text-(--klyroo-text-muted)">Between 15% and 40%.</p></Body>
</KlyDashboardPanel>
<KlyDashboardPanel Resizable Size="50" MinSize="30" ResizeLabel="Resize detail" data-testid="dashboard-panel-detail">
<Header><KlyDashboardNavbar Title="Detail" Toggle="false" /></Header>
<Body><p class="text-sm text-(--klyroo-text-muted)">At least 30%. Focus a handle and use the arrow keys, Home and End.</p></Body>
<Footer><p class="px-4 py-2 text-xs text-(--klyroo-text-muted)">Footer</p></Footer>
</KlyDashboardPanel>
<KlyDashboardPanel data-testid="dashboard-panel-aside">
<Header><KlyDashboardNavbar Title="Aside" Toggle="false" /></Header>
<Body><p class="text-sm text-(--klyroo-text-muted)">Takes what is left.</p></Body>
</KlyDashboardPanel>
</KlyDashboardGroup>
</div>API
KlyDashboardPanel
Column of a dashboard with a header, a scrollable body and a footer, optionally resizable.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
MaxSize |
Double |
100 |
Largest share of the group the panel can take, in percent. Defaults to 100. |
MinSize |
Double |
0 |
Smallest share of the group the panel can take, in percent. |
Resizable |
bool |
false |
Adds a KlyDashboardResizeHandle on the trailing edge, to resize the panel against the next one. |
ResizeLabel |
string |
Accessible name of the resize handle. Defaults to the built-in text. | |
Size |
Double? |
Size in percent when nothing is remembered. Panels without one share what the others leave. | |
Ui |
DashboardPanelUi |
Per-instance class overrides of the slots of the dashboard panel, see DashboardPanelUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Body |
RenderFragment |
The scrollable middle. |
Footer |
RenderFragment |
Content of the footer of the panel, below its scrollable body. |
Header |
RenderFragment |
The top of the panel: usually a KlyDashboardNavbar and a KlyDashboardToolbar . |
ChildContent |
RenderFragment |
Replaces the header, the body and the footer. |
Ui slots
Ui takes a DashboardPanelUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyDashboardPanel , after the theme and the app configuration. |
Header |
Classes merged into the header slot of KlyDashboardPanel , after the theme and the app configuration. |
Body |
Classes merged into the body slot of KlyDashboardPanel , after the theme and the app configuration. |
Footer |
Classes merged into the footer slot of KlyDashboardPanel , after the theme and the app configuration. |