List
Plain, stepped or checked items.
On this page
Examples
Plain, steps and checks
Plain
- 2 sCompile
- 14 sTest
- Publish
Steps
- completedCreate the account
- 2Add a cardTakes two minutes
- 3Launch
Checks (Max 2, Step 2)
- completedHTTPS
- completedBackups
Razor
<div class="grid w-full gap-4 md:grid-cols-3">
<KlyList Title="Plain" Surface="KlySurface.Bordered" Items="@(new[] { new KlyListItem("Compile") { Meta = "2 s" }, new KlyListItem("Test") { Meta = "14 s" }, new KlyListItem("Publish") })" />
<KlyList Title="Steps" Variant="KlyListVariant.Steps" Surface="KlySurface.Bordered" Items="@(new[]
{
new KlyListItem("Create the account") { Done = true },
new KlyListItem("Add a card") { Current = true, Description = "Takes two minutes" },
new KlyListItem("Launch"),
})" />
<KlyList Title="Checks (Max 2, Step 2)" Variant="KlyListVariant.Checks" Max="2" Step="2" Surface="KlySurface.Bordered" Items="@(new[]
{
new KlyListItem("HTTPS") { Done = true },
new KlyListItem("Backups") { Done = true },
new KlyListItem("Two-factor sign-in"),
})" />
</div>API
KlyList
A list of items: plain, numbered steps or a checklist.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
Items |
IReadOnlyList |
The items, as KlyListItem . | |
Loading |
bool |
false |
Shows a skeleton placeholder instead of the content. |
Max |
int? |
The number of items shown before a Show more button (all items when null ). | |
Step |
int? |
The number of items each click on Show more reveals (all the remaining ones when null ). | |
Surface |
KlySurface? |
The surface treatment. Plain when not set. Values: Plain, Muted, Bordered, Elevated. |
|
Title |
string |
The title above the list. | |
Ui |
ListUi |
Per-instance class overrides of the slots of the list, see ListUi . They are merged after the theme and the Class parameter wins on the root slot. | |
Variant |
KlyListVariant |
KlyListVariant. |
The layout: Plain (bullets or icons), Steps (a numbered list) or Checks (a checklist). Values: Plain, Steps, Checks. |
Ui slots
Ui takes a ListUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyList , after the theme and the app configuration. |
Title |
Classes merged into the title slot of KlyList , after the theme and the app configuration. |
List |
Classes merged into the list slot of KlyList , after the theme and the app configuration. |
Item |
Classes merged into the item slot of KlyList , after the theme and the app configuration. |
Lead |
Classes merged into the lead slot of KlyList , after the theme and the app configuration. |
Marker |
Classes merged into the marker slot of KlyList , after the theme and the app configuration. |
MarkerIcon |
Classes merged into the markerIcon slot of KlyList , after the theme and the app configuration. |
Icon |
Classes merged into the icon slot of KlyList , after the theme and the app configuration. |
Bullet |
Classes merged into the bullet slot of KlyList , after the theme and the app configuration. |
Body |
Classes merged into the body slot of KlyList , after the theme and the app configuration. |
Text |
Classes merged into the text slot of KlyList , after the theme and the app configuration. |
Link |
Classes merged into the link slot of KlyList , after the theme and the app configuration. |
Description |
Classes merged into the description slot of KlyList , after the theme and the app configuration. |
Meta |
Classes merged into the meta slot of KlyList , after the theme and the app configuration. |
More |
Classes merged into the more slot of KlyList , after the theme and the app configuration. |
MoreIcon |
Classes merged into the moreIcon slot of KlyList , after the theme and the app configuration. |
Skeleton |
Classes merged into the skeleton slot of KlyList , after the theme and the app configuration. |