Skip to content
Page PageFeature

PageFeature

An icon, a title and a description, optionally one link over the whole feature.

On this page

Examples

With an Href the title is the only link and its box stretches over the feature: one focus stop, no nested links.

Fast by default

Static pages ship no script of their own.

Secure forms

Antiforgery and validation work out of the box.

Typed API

Parameters, enums and slot records you can discover from the editor.

Read the guide

The whole feature is one link.

Razor
<div class="grid w-full gap-8 sm:grid-cols-2">
    <KlyPageFeature Icon="zap" Title="Fast by default" Description="Static pages ship no script of their own." />
    <KlyPageFeature Icon="lock" Title="Secure forms" Description="Antiforgery and validation work out of the box." Color="KlyColor.Success" />
    <KlyPageFeature Icon="code" Title="Typed API" Description="Parameters, enums and slot records you can discover from the editor."
                   Orientation="KlyOrientation.Vertical" />
    <KlyPageFeature Icon="file" Title="Read the guide" Description="The whole feature is one link."
                   Href="/docs/installation" Orientation="KlyOrientation.Vertical" data-testid="feature-link" />
</div>

API

KlyPageFeature

Feature block with an icon, a title and a description, optionally linked.

Parameters

Name Type Default Description
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "primary" Semantic color of the page feature: a built-in KlyColor or the name of a color you defined. When not set, Color applies, else the default of the component. Values: primary, secondary, success, info, warning, error, neutral.
Description string Secondary text of the page feature, shown under or next to its title.
HeadingLevel int? Renders the title as a heading of this level (1 to 6) instead of a paragraph.
Href string Makes the whole feature a link, carried by the title.
Icon string Name of a built-in icon (see KlyIcon ).
Orientation KlyOrientation KlyOrientation.Horizontal Horizontal puts the icon before the text; vertical puts it above. Values: Horizontal, Vertical.
Target KlyLinkTarget? The target attribute of the link of the feature, such as Blank . It applies when Href is set.
Title string Title of the page feature.
Ui PageFeatureUi Per-instance class overrides of the slots of the page feature, see PageFeatureUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
ChildContent RenderFragment Extra content under the description. Interactive content would sit under the stretched link: give it relative z-10 .

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPageFeature , after the theme and the app configuration.
Leading Classes merged into the leading slot of KlyPageFeature , after the theme and the app configuration.
LeadingIcon Classes merged into the leadingIcon slot of KlyPageFeature , after the theme and the app configuration.
Wrapper Classes merged into the wrapper slot of KlyPageFeature , after the theme and the app configuration.
Title Classes merged into the title slot of KlyPageFeature , after the theme and the app configuration.
Description Classes merged into the description slot of KlyPageFeature , after the theme and the app configuration.
Link Classes merged into the link slot of KlyPageFeature , after the theme and the app configuration.