Page
A grid of up to three columns: optional left and right asides around the main content.
On this page
Examples
Left, center and right
The side columns show from the lg breakpoint and stack in reading order below it.
Guides
Deploying to production
Ship your Blazor app with a release build, a health check and a rollback plan.
Publish in Release mode, then run the container behind a reverse proxy that terminates TLS.
Razor
@* The side columns show from the lg breakpoint. In a real layout the asides sit at the top level of the page. *@
<div class="w-full overflow-hidden rounded-lg border border-(--klyroo-border) bg-(--klyroo-bg) px-6">
<KlyPage>
<Left>
<KlyPageAside As="PageAsideElement.Div" Class="static">
<KlyPageLinks Title="Guides" Links="_guides" />
</KlyPageAside>
</Left>
<ChildContent>
<KlyPageHeader Headline="Guides" Title="Deploying to production" HeadingLevel="3"
Description="Ship your Blazor app with a release build, a health check and a rollback plan." />
<KlyPageBody Class="mt-6 pb-8">
<p>Publish in Release mode, then run the container behind a reverse proxy that terminates TLS.</p>
</KlyPageBody>
</ChildContent>
<Right>
<KlyPageAside As="PageAsideElement.Div" Class="static">
<KlyPageAnchors Links="_anchors" />
</KlyPageAside>
</Right>
</KlyPage>
</div>
@code {
private readonly PageLinkItem[] _guides =
[
new("Getting started", "/docs/installation") { Active = false },
new("Deploying to production", "/docs/render-modes") { Active = true },
new("Theming", "/docs/theming") { Active = false },
];
private readonly PageLinkItem[] _anchors =
[
new("Build", "#build"),
new("Health checks", "#health"),
new("Rollbacks", "#rollbacks"),
];
}API
KlyPage
Page layout of up to three columns, with optional left and right columns that stack below the lg breakpoint.
Parameters
| Name | Type | Description |
|---|---|---|
Class |
string |
Classes added to the root element, merged last so they win over the theme. |
Ui |
PageUi |
Per-instance class overrides of the slots of the page, see PageUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Left |
RenderFragment |
The left column, typically a KlyPageAside holding navigation. |
Right |
RenderFragment |
The right column, typically a KlyPageAside holding a table of contents. |
ChildContent |
RenderFragment |
The main column. |
Ui slots
Ui takes a PageUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyPage , after the theme and the app configuration. |
Left |
Classes merged into the left slot of KlyPage , after the theme and the app configuration. |
Center |
Classes merged into the center slot of KlyPage , after the theme and the app configuration. |
Right |
Classes merged into the right slot of KlyPage , after the theme and the app configuration. |