marketing/DSPricingCard

DSPricingCard

marketing
since v2.0

Subscription plan card with name, price, billing period, feature list with checkmarks, CTA, and highlighted state for the recommended plan.

iOS 17+macOS 14+

Purpose

Landing pages and upgrade screens. Clearly communicates value and differences between plans.

Props

PropTypeDefaultDescription
namereqStringPlan name (e.g. 'Pro').
pricereqStringFormatted price.
periodreqStringBilling period (e.g. '/month').
descriptionreqStringPlan value proposition.
featuresreq[String]List of included features.
ctaLabelreqStringCTA button text.
isHighlightedBoolfalseShows border and 'Recommended' badge.
onSelectreq(() -> Void)CTA action.

Examples

Three plans

Starter, Pro (highlighted), and Enterprise.

swift
HStack(spacing: DSSpacing.md) {
    DSPricingCard(
        name: "Starter",
        price: "Free",
        period: "",
        description: "For personal projects",
        features: ["3 projects", "1 user", "1 GB storage"],
        ctaLabel: "Get started free",
        onSelect: {}
    )
    DSPricingCard(
        name: "Pro",
        price: "$49",
        period: "/month",
        description: "For small teams",
        features: ["Unlimited projects", "5 users", "50 GB storage", "Analytics"],
        ctaLabel: "Subscribe to Pro",
        isHighlighted: true,
        onSelect: { subscribe(.pro) }
    )
}

Usage Guidelines

  • Highlight only 1 plan as recommended.
  • Keep features comparable across all cards (use — to indicate absence).

Related Components