Skip to content
Page PageCta

PageCta

A call to action band with a title, a description and links, in four variants.

On this page

Examples

Solid and soft

In the solid variant use a neutral button: a primary one would disappear into the band.

Start building today

Add the package, import the stylesheet and render your first component in a minute.

Questions before you start?

Browse the guides or open a discussion.

Razor
<div class="w-full overflow-hidden rounded-lg border border-(--klyroo-border) bg-(--klyroo-bg)">
    <KlyPageCta Variant="KlyVariant.Solid" Title="Start building today" HeadingLevel="3"
               Description="Add the package, import the stylesheet and render your first component in a minute."
               Links="_solid" Class="py-6" />
    <KlyPageCta Variant="KlyVariant.Soft" Title="Questions before you start?" HeadingLevel="3"
               Description="Browse the guides or open a discussion."
               Links="_soft" Class="py-6" />
</div>

@code {
    private readonly PageLinkItem[] _solid =
    [
        new("Get started", "/docs/installation") { Color = KlyColor.Neutral },
    ];

    private readonly PageLinkItem[] _soft =
    [
        new("Read the guides", "/docs/installation"),
        new("Ask a question", "https://github.com/") { Target = KlyLinkTarget.Blank, Color = KlyColor.Neutral, Variant = ButtonVariant.Outline },
    ];
}

API

KlyPageCta

Call to action band with a title, a description and links.

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 cta: 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 cta, shown under or next to its title.
HeadingLevel int 2 Level of the title heading, 1 to 6.
Links IReadOnlyList<PageLinkItem> Links rendered as buttons beside (horizontal) or under (vertical) the text.
Orientation KlyOrientation KlyOrientation.Horizontal Horizontal puts the links beside the text from the lg breakpoint; vertical centers everything. Values: Horizontal, Vertical.
Reverse bool false Shows the links before the text in a horizontal band.
Title string Title of the page cta.
Ui PageCtaUi Per-instance class overrides of the slots of the page cta, see PageCtaUi . They are merged after the theme and the Class parameter wins on the root slot.
Variant KlyVariant KlyVariant.Outline Look of the band: Solid , Outline , Soft or Subtle . Values: Solid, Outline, Soft, Subtle.

Slots

Name Type Description
ChildContent RenderFragment Extra content under the description.

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPageCta , after the theme and the app configuration.
Container Classes merged into the container slot of KlyPageCta , after the theme and the app configuration.
Wrapper Classes merged into the wrapper slot of KlyPageCta , after the theme and the app configuration.
Title Classes merged into the title slot of KlyPageCta , after the theme and the app configuration.
Description Classes merged into the description slot of KlyPageCta , after the theme and the app configuration.
Links Classes merged into the links slot of KlyPageCta , after the theme and the app configuration.
Body Classes merged into the body slot of KlyPageCta , after the theme and the app configuration.