Skip to content
Page PageSection

PageSection

A marketing section with a headline, a title, a description, features, links and media.

On this page

Examples

Features and media

The section is a landmark named by its title. A feature with an Href is one link over the whole feature.

Features

Built for the way Blazor renders

Components that work before the runtime starts and keep working after it does.

  • Browser-first state

    Menus, dialogs and tabs answer in the browser, with no round trip.

  • Accessible by default

    ARIA patterns, keyboard support and contrast checked in light and dark.

  • Themeable

    A handful of CSS variables restyle every component.

Render mode: static

This panel is plain server-rendered HTML.

Razor
<div class="w-full overflow-hidden rounded-lg border border-(--klyroo-border) bg-(--klyroo-bg)">
    <KlyPageSection Icon="zap" Headline="Features" Title="Built for the way Blazor renders" HeadingLevel="3"
                   Description="Components that work before the runtime starts and keep working after it does."
                   Features="_features" Links="_links" Ui="_ui">
        <Media>
            <div class="rounded-xl border border-(--klyroo-border) bg-(--klyroo-bg-elevated) p-6 text-sm text-(--klyroo-text-muted)">
                <p class="font-mono text-(--klyroo-text)">Render mode: static</p>
                <p class="mt-2">This panel is plain server-rendered HTML.</p>
            </div>
        </Media>
    </KlyPageSection>
</div>

@code {
    private readonly PageSectionUi _ui = new() { Container = "py-12 sm:py-12 lg:py-12" };

    private readonly PageFeatureItem[] _features =
    [
        new("Browser-first state", "Menus, dialogs and tabs answer in the browser, with no round trip.") { Icon = "globe" },
        new("Accessible by default", "ARIA patterns, keyboard support and contrast checked in light and dark.") { Icon = "eye" },
        new("Themeable", "A handful of CSS variables restyle every component.") { Icon = "pencil", Href = "/docs/theming" },
    ];

    private readonly PageLinkItem[] _links =
    [
        new("Read the docs", "/docs/installation") { Color = KlyColor.Neutral, Variant = ButtonVariant.Outline },
    ];
}

API

KlyPageSection

Section of a landing page, with a headline, a title, a description, a list of features and a media area.

Parameters

Name Type Default Description
Class string Classes added to the root element, merged last so they win over the theme.
Description string Secondary text of the page section, shown under or next to its title.
FeatureHeadingLevel int? Renders the feature titles as headings of this level; they are plain text by default.
Features IReadOnlyList<PageFeatureItem> Features listed under the links, each with an icon, a title and a description.
HeadingLevel int 2 Level of the title heading, 1 to 6.
Headline string Short text above the title, such as a category.
Icon string Name of a built-in icon shown above the headline.
Links IReadOnlyList<PageLinkItem> Links rendered as buttons under the description.
Orientation KlyOrientation KlyOrientation.Horizontal Horizontal puts the text and the media side by side; vertical stacks them and spreads the features on three columns. Values: Horizontal, Vertical.
Reverse bool false Shows the media before the text in a horizontal section.
Title string Title of the page section.
Ui PageSectionUi Per-instance class overrides of the slots of the page section, see PageSectionUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
Media RenderFragment An illustration or a screenshot shown beside (horizontal) or under (vertical) the text.
ChildContent RenderFragment Extra content after the features.

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPageSection , after the theme and the app configuration.
Container Classes merged into the container slot of KlyPageSection , after the theme and the app configuration.
Wrapper Classes merged into the wrapper slot of KlyPageSection , after the theme and the app configuration.
Leading Classes merged into the leading slot of KlyPageSection , after the theme and the app configuration.
LeadingIcon Classes merged into the leadingIcon slot of KlyPageSection , after the theme and the app configuration.
Headline Classes merged into the headline slot of KlyPageSection , after the theme and the app configuration.
Title Classes merged into the title slot of KlyPageSection , after the theme and the app configuration.
Description Classes merged into the description slot of KlyPageSection , after the theme and the app configuration.
Links Classes merged into the links slot of KlyPageSection , after the theme and the app configuration.
Features Classes merged into the features slot of KlyPageSection , after the theme and the app configuration.
Feature Classes merged into the feature slot of KlyPageSection , after the theme and the app configuration.
Media Classes merged into the media slot of KlyPageSection , after the theme and the app configuration.

PageFeatureItem

A feature of a KlyPageSection .

Parameters

Name Type Description
Description string Text under the title.
Href string Address the feature links to.
Icon string Name of a built-in icon (see KlyIcon ) shown above the title.
Target KlyLinkTarget? The target attribute of the link, such as Blank .
Title string Title of the feature.

PageLinkItem

A link of the page family. KlyPageHeader , KlyPageHero , KlyPageSection and KlyPageCta render it as a button ( Color and Variant apply); KlyPageLinks and KlyPageAnchors render it as a text link.

Parameters

Name Type Description
Active bool? Forces the active state of a text link; otherwise it follows the current address.
Color KlyColor? Defaults to Color , or primary. Values: primary, secondary, success, info, warning, error, neutral.
Disabled bool Disables the link.
Exact bool Requires the whole path to match for a text link to be active.
Href string Address the link points to.
Icon string Name of a built-in icon (see KlyIcon ) shown before the label.
Label string Text of the link.
Target KlyLinkTarget? The target attribute of the link, such as Blank .
TrailingIcon string Name of a built-in icon shown after the label (buttons only).
Variant ButtonVariant Look of the button when the link is rendered as one. Values: Solid, Outline, Soft, Subtle, Ghost, Link.