Heading
A section heading with a count.
On this page
Examples
Heading
Subscriptions
42Updated 5 minutes ago
Razor
<div class="w-full max-w-xl">
<KlyHeading Title="Subscriptions" Count="42" Description="Updated 5 minutes ago" HeadingLevel="2"
Action="@(new KlyActionItem("Export") { Href = "#" })">
<Icon><KlyIcon Name="ph:credit-card" /></Icon>
</KlyHeading>
</div>API
KlyHeading
A section heading with an optional icon tile, count pill, description and action button.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Action |
KlyActionItem |
The button at the end of the row. | |
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
Count |
int? |
A count shown in a pill beside the title, formatted with the format culture of the locale. | |
Description |
string |
A line of smaller text under the title. | |
HeadingLevel |
int |
3 |
The level of the heading element, from 1 ( h1 ) to 6 ( h6 ); 3 by default, and values outside are clamped. Choose it from the page outline: the look does not change with the level. |
Loading |
bool |
false |
Shows a skeleton placeholder instead of the content. |
Surface |
KlySurface? |
The surface treatment. Plain when not set. Values: Plain, Muted, Bordered, Elevated. |
|
Title |
string |
The title, drawn as the heading element chosen by HeadingLevel . | |
Ui |
HeadingUi |
Per-instance class overrides of the slots of the heading, see HeadingUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Icon |
RenderFragment |
The icon in the tile before the title, as markup such as a KlyIcon . |
Ui slots
Ui takes a HeadingUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyHeading , after the theme and the app configuration. |
Lead |
Classes merged into the lead slot of KlyHeading , after the theme and the app configuration. |
Icon |
Classes merged into the icon slot of KlyHeading , after the theme and the app configuration. |
Text |
Classes merged into the text slot of KlyHeading , after the theme and the app configuration. |
TitleRow |
Classes merged into the titleRow slot of KlyHeading , after the theme and the app configuration. |
Title |
Classes merged into the title slot of KlyHeading , after the theme and the app configuration. |
Count |
Classes merged into the count slot of KlyHeading , after the theme and the app configuration. |
Description |
Classes merged into the description slot of KlyHeading , after the theme and the app configuration. |
Skeleton |
Classes merged into the skeleton slot of KlyHeading , after the theme and the app configuration. |