Skip to content
Page PageGrid

PageGrid

A responsive grid of two to four columns.

On this page

Examples

Three columns

Instant

Pages render on the server and stay light.

Private

Nothing leaves your servers unless you send it.

Global

Static output caches well on any CDN.

Typed

Strongly typed parameters everywhere.

Readable

Contrast is checked in light and dark.

Aware

Toasts and banners say what changed.

Razor
<KlyPageGrid Columns="3" Class="w-full gap-4">
    @foreach (var (icon, title, text) in _items)
    {
        <KlyPageCard Icon="@icon" Title="@title" Description="@text" />
    }
</KlyPageGrid>

@code {
    private readonly (string Icon, string Title, string Text)[] _items =
    [
        ("zap", "Instant", "Pages render on the server and stay light."),
        ("lock", "Private", "Nothing leaves your servers unless you send it."),
        ("globe", "Global", "Static output caches well on any CDN."),
        ("code", "Typed", "Strongly typed parameters everywhere."),
        ("eye", "Readable", "Contrast is checked in light and dark."),
        ("bell", "Aware", "Toasts and banners say what changed."),
    ];
}

API

KlyPageGrid

Responsive grid of page items.

Parameters

Name Type Default Description
Class string Classes added to the root element, merged last so they win over the theme.
Columns int 3 Number of columns from the lg breakpoint, 2 to 4: one column on phones, two from sm.
Ui PageGridUi Per-instance class overrides of the slots of the page grid, see PageGridUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
ChildContent RenderFragment The items of the grid, such as KlyPageCard or KlyPageFeature .

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPageGrid , after the theme and the app configuration.