Skip to content
Page PricingPlan

PricingPlan

A card for one plan: title, badge, price with an optional discount, feature list and a call to action.

On this page

Examples

Discount, solid and horizontal

A discount shows the original price struck through, and spells both prices out for screen readers.

Pro

Launch offer

For growing teams that ship every week.

Save 20% for the first year

Original price $120 Now $96/year

Renews at $120 a year.

  • Unlimited projects
  • Priority support
  • Early access to new components

Team

For organizations with compliance needs.

$99/month

  • Everything in Pro
  • Single sign-on
  • Dedicated manager

Enterprise

Custom limits, invoicing and a service agreement.

Custom

  • Unlimited seats
  • Custom contract
  • On-premises option
Razor
<div class="grid w-full gap-6 lg:grid-cols-2">
    <KlyPricingPlan Title="Pro" Badge="Launch offer" Description="For growing teams that ship every week."
                   Tagline="Save 20% for the first year" Price="$120" Discount="$96" BillingCycle="/year" Terms="Renews at $120 a year."
                   Features="@(["Unlimited projects", "Priority support", new KlyPricingFeature("Early access to new components") { Icon = "zap" }])"
                   ButtonLabel="Claim the offer" ButtonHref="/docs" Highlight />
    <KlyPricingPlan Title="Team" Description="For organizations with compliance needs." Variant="KlyVariant.Solid"
                   Price="$99" BillingCycle="/month" Features="@(["Everything in Pro", "Single sign-on", "Dedicated manager"])"
                   ButtonLabel="Contact sales" ButtonHref="/docs" />
    <KlyPricingPlan Title="Enterprise" Description="Custom limits, invoicing and a service agreement." Variant="KlyVariant.Soft"
                   Orientation="KlyOrientation.Horizontal" Price="Custom" Features="@(["Unlimited seats", "Custom contract", "On-premises option"])"
                   ButtonLabel="Talk to us" ButtonHref="/docs" Class="lg:col-span-2" />
</div>

API

KlyPricingPlan

Card of one pricing plan, with its price, features and call to action.

Parameters

Name Type Default Description
Badge string Text of a badge next to the title, such as "Popular".
BadgeColor KlyColor? Color of the badge; the plan's color by default. Values: primary, secondary, success, info, warning, error, neutral.
BillingCycle string Text after the price: "/month".
ButtonColor KlyColor? Color of the call to action button. Defaults to neutral for a solid plan, else to the color of the plan. Values: primary, secondary, success, info, warning, error, neutral.
ButtonHref string Makes the button a link.
ButtonLabel string Label of the button at the bottom.
ButtonVariant ButtonVariant? Look of the call to action button. Defaults to solid for a highlighted or solid plan, else to outline. Values: Solid, Outline, Soft, Subtle, Ghost, Link.
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "primary" Semantic color of the pricing plan: 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 pricing plan, shown under or next to its title.
Discount string The discounted price, shown instead of Price .
Features IReadOnlyList<KlyPricingFeature> The included features. A string converts to a feature.
HeadingLevel int 3 Level of the title heading: 3 by default, for plans under a level 2 heading.
Highlight bool false Adds a ring around the plan.
Orientation KlyOrientation KlyOrientation.Vertical Horizontal lays the plan out in a row on wide screens: the price on the left, the features, then the button. Values: Horizontal, Vertical.
Price string The price, formatted by the caller ("$29"). With Discount it is the original price, struck through.
Scale bool false Enlarges the plan on wide screens so it stands out from the others.
Tagline string A value statement above the price.
Terms string Fine print under the price.
Title string The plan name, in a heading.
Ui PricingPlanUi Per-instance class overrides of the slots of the pricing plan, see PricingPlanUi . They are merged after the theme and the Class parameter wins on the root slot.
Variant KlyVariant KlyVariant.Outline Look of the plan card: Solid , Outline , Soft or Subtle . Values: Solid, Outline, Soft, Subtle.

Events

Name Type Description
OnButtonClick EventCallback<MouseEventArgs> Click of the button. As for KlyButton , it stays disabled until the page is interactive.

Slots

Name Type Description
Footer RenderFragment Replaces the button.

Ui slots

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

Slot Styles
Root Classes merged into the root slot of KlyPricingPlan , after the theme and the app configuration.
Intro Classes merged into the intro slot of KlyPricingPlan , after the theme and the app configuration.
Header Classes merged into the header slot of KlyPricingPlan , after the theme and the app configuration.
TitleRow Classes merged into the titleRow slot of KlyPricingPlan , after the theme and the app configuration.
Title Classes merged into the title slot of KlyPricingPlan , after the theme and the app configuration.
Badge Classes merged into the badge slot of KlyPricingPlan , after the theme and the app configuration.
Description Classes merged into the description slot of KlyPricingPlan , after the theme and the app configuration.
Tagline Classes merged into the tagline slot of KlyPricingPlan , after the theme and the app configuration.
Pricing Classes merged into the pricing slot of KlyPricingPlan , after the theme and the app configuration.
PriceRow Classes merged into the priceRow slot of KlyPricingPlan , after the theme and the app configuration.
Price Classes merged into the price slot of KlyPricingPlan , after the theme and the app configuration.
Discount Classes merged into the discount slot of KlyPricingPlan , after the theme and the app configuration.
BillingCycle Classes merged into the billingCycle slot of KlyPricingPlan , after the theme and the app configuration.
Terms Classes merged into the terms slot of KlyPricingPlan , after the theme and the app configuration.
Features Classes merged into the features slot of KlyPricingPlan , after the theme and the app configuration.
Feature Classes merged into the feature slot of KlyPricingPlan , after the theme and the app configuration.
FeatureIcon Classes merged into the featureIcon slot of KlyPricingPlan , after the theme and the app configuration.
Footer Classes merged into the footer slot of KlyPricingPlan , after the theme and the app configuration.