Skip to content
Page PageList

PageList

A vertical list with optional dividers, for stacks of users, posts or cards.

On this page

Examples

With dividers

The direct children are li elements.

  • Ada LovelaceAnalyst
  • Grace HopperCompiler pioneer
  • Margaret HamiltonFlight software
Razor
<div class="w-full max-w-xl">
    <KlyPageList>
        @foreach (var (name, role) in _people)
        {
            <li><KlyUser Name="@name" Description="@role" /></li>
        }
    </KlyPageList>
</div>

@code {
    private readonly (string Name, string Role)[] _people =
    [
        ("Ada Lovelace", "Analyst"),
        ("Grace Hopper", "Compiler pioneer"),
        ("Margaret Hamilton", "Flight software"),
    ];
}

API

KlyPageList

Styled list whose children are list items.

Parameters

Name Type Default Description
Class string Classes added to the root element, merged last so they win over the theme.
Divide bool true Draws a line between the items; otherwise they are only spaced.
Ui PageListUi Per-instance class overrides of the slots of the page list, see PageListUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
ChildContent RenderFragment The items, as li elements.

Ui slots

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

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