Skip to content
Page PricingTable

PricingTable

A feature comparison across tiers: sticky header, check and minus icons with hidden text, tiers stacked on small screens.

On this page

Examples

Three tiers

Cells are a boolean (check or minus), or text. Below the md breakpoint each tier becomes a card and every row names its tier.

Compare the Starter, Pro and Team plans
StarterFor side projects.$0/monthProPopularFor growing teams.$29/monthTeamFor larger organizations.$99/month
Usage
Projects3UnlimitedUnlimited
Storage1 GB100 GB1 TB
Team members11050
Support
Community forumIncludedIncludedIncluded
Email supportNot includedIncludedIncluded
Dedicated managerNot includedNot includedIncluded
Security
Audit logNot includedIncludedIncluded
Single sign-onNot includedNot includedIncluded
Razor
<div class="w-full">
    <KlyPricingTable Caption="Compare the Starter, Pro and Team plans" Tiers="Tiers" Sections="Sections" />
</div>

@code {
    private static readonly KlyPricingTier[] Tiers =
    [
        new("starter", "Starter") { Description = "For side projects.", Price = "$0", BillingCycle = "/month", ButtonLabel = "Start for free", ButtonHref = "/docs" },
        new("pro", "Pro") { Description = "For growing teams.", Price = "$29", BillingCycle = "/month", Badge = "Popular", Highlight = true, ButtonLabel = "Get Pro", ButtonHref = "/docs" },
        new("team", "Team") { Description = "For larger organizations.", Price = "$99", BillingCycle = "/month", ButtonLabel = "Contact sales", ButtonHref = "/docs" },
    ];

    private static readonly KlyPricingSection[] Sections =
    [
        new("Usage",
        [
            new("Projects", 3, "Unlimited", "Unlimited"),
            new("Storage", "1 GB", "100 GB", "1 TB"),
            new("Team members", 1, 10, 50),
        ]),
        new("Support",
        [
            new("Community forum", true, true, true),
            new("Email support", false, true, true),
            new("Dedicated manager", false, false, true),
        ]),
        new("Security",
        [
            new("Audit log", false, true, true),
            new("Single sign-on", false, false, true),
        ]),
    ];
}

API

KlyPricingTable

Comparison table of pricing tiers and their features. On small screens each tier becomes a card.

Parameters

Name Type Default Description
Caption string Name of the table for assistive technology. It is not shown.
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "primary" Semantic color of the accents of the table: a built-in KlyColor or the name of a color you defined. Values: primary, secondary, success, info, warning, error, neutral.
Sections (required) IReadOnlyList<KlyPricingSection> The groups of rows.
Sticky bool true Keeps the tier headers at the top of the viewport while the table scrolls, from the md breakpoint up. The distance from the top is the --kly-sticky-offset CSS variable (0 by default), for pages with a fixed header.
Tiers (required) IReadOnlyList<KlyPricingTier> The columns.
Ui PricingTableUi Per-instance class overrides of the slots of the pricing table, see PricingTableUi . They are merged after the theme and the Class parameter wins on the root slot.

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPricingTable , after the theme and the app configuration.
Table Classes merged into the table slot of KlyPricingTable , after the theme and the app configuration.
Caption Classes merged into the caption slot of KlyPricingTable , after the theme and the app configuration.
Thead Classes merged into the thead slot of KlyPricingTable , after the theme and the app configuration.
HeadRow Classes merged into the headRow slot of KlyPricingTable , after the theme and the app configuration.
Corner Classes merged into the corner slot of KlyPricingTable , after the theme and the app configuration.
Tier Classes merged into the tier slot of KlyPricingTable , after the theme and the app configuration.
TierTitle Classes merged into the tierTitle slot of KlyPricingTable , after the theme and the app configuration.
TierBadge Classes merged into the tierBadge slot of KlyPricingTable , after the theme and the app configuration.
TierDescription Classes merged into the tierDescription slot of KlyPricingTable , after the theme and the app configuration.
TierPrice Classes merged into the tierPrice slot of KlyPricingTable , after the theme and the app configuration.
TierDiscount Classes merged into the tierDiscount slot of KlyPricingTable , after the theme and the app configuration.
TierCycle Classes merged into the tierCycle slot of KlyPricingTable , after the theme and the app configuration.
TierButton Classes merged into the tierButton slot of KlyPricingTable , after the theme and the app configuration.
Tbody Classes merged into the tbody slot of KlyPricingTable , after the theme and the app configuration.
SectionRow Classes merged into the sectionRow slot of KlyPricingTable , after the theme and the app configuration.
Section Classes merged into the section slot of KlyPricingTable , after the theme and the app configuration.
Row Classes merged into the row slot of KlyPricingTable , after the theme and the app configuration.
Feature Classes merged into the feature slot of KlyPricingTable , after the theme and the app configuration.
Cell Classes merged into the cell slot of KlyPricingTable , after the theme and the app configuration.
ValueIcon Classes merged into the valueIcon slot of KlyPricingTable , after the theme and the app configuration.
Included Classes merged into the included slot of KlyPricingTable , after the theme and the app configuration.
NotIncluded Classes merged into the notIncluded slot of KlyPricingTable , after the theme and the app configuration.