Skip to content
Page PageAside

PageAside

A sticky aside for page navigation, shown from the lg breakpoint.

On this page

Examples

Top, body and bottom

An aside is a complementary landmark: name it when the page has several, and render it as a div when it sits inside another landmark.

Docs

Version 0.1

Razor
@* Sticky below the header and shown from the lg breakpoint. Rendered here with As="div" because the example sits inside a landmark. *@
<div class="w-full max-w-xs rounded-lg border border-(--klyroo-border) bg-(--klyroo-bg) px-4">
    <KlyPageAside As="PageAsideElement.Div" Class="static block py-4">
        <Top><p class="text-sm font-semibold text-(--klyroo-text-highlighted)">Docs</p></Top>
        <ChildContent><KlyPageLinks aria-label="Docs navigation" Links="_links" /></ChildContent>
        <Bottom><p class="text-xs text-(--klyroo-text-muted)">Version 0.1</p></Bottom>
    </KlyPageAside>
</div>

@code {
    private readonly PageLinkItem[] _links =
    [
        new("Installation", "/docs/installation") { Active = false },
        new("Theming", "/docs/theming") { Active = false },
    ];
}

API

KlyPageAside

Sticky side column of a page, shown from the lg breakpoint up.

Parameters

Name Type Default Description
As PageAsideElement PageAsideElement.Aside The element to render: Aside (default) or Div . Values: Aside, Div.
Class string Classes added to the root element, merged last so they win over the theme.
Ui PageAsideUi Per-instance class overrides of the slots of the page aside, see PageAsideUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
Bottom RenderFragment Content at the bottom of the column.
Top RenderFragment Content at the top of the column.
ChildContent RenderFragment Content of the page aside.

Ui slots

Ui takes a PageAsideUi with one class string per slot, merged after the theme.

Slot Styles
Root Classes merged into the root slot of KlyPageAside , after the theme and the app configuration.
Top Classes merged into the top slot of KlyPageAside , after the theme and the app configuration.
Body Classes merged into the body slot of KlyPageAside , after the theme and the app configuration.
Bottom Classes merged into the bottom slot of KlyPageAside , after the theme and the app configuration.