Pricing

Pricing section patterns for SaaS and product landing pages. Tiered cards, feature comparison tables, and billing toggle options.

Overview

Pricing sections help users understand and compare your offerings. These patterns use data-layout="grid" for responsive card layouts and semantic table markup for feature comparisons, creating accessible and mobile-friendly pricing displays.

Key features:

  • Responsive card grids with data-layout="grid"
  • Highlighted recommended tier
  • Feature comparison tables with sticky headers
  • Monthly/yearly billing toggle with :has() selector
  • Accessible markup with proper semantics
  • No JavaScript required for basic functionality

Pricing Cards

Three-tier pricing cards in a responsive grid. The middle tier is highlighted as "Most Popular" with accent styling and a badge.

Required CSS

Add these styles for pricing card layouts:

Comparison Table

A feature comparison table with plan columns and feature rows. Uses semantic <table> markup with proper scope attributes for accessibility. The header is sticky for easy comparison while scrolling.

Required CSS

Add these styles for pricing tables:

With Billing Toggle

Pricing cards with a monthly/yearly billing toggle. Uses the CSS :has() selector to show different prices based on the toggle state, requiring no JavaScript for core functionality.

Required CSS

Add these styles for the billing toggle. The :has() selector enables price switching without JavaScript:

Optional JavaScript Enhancement

The core price-switching is CSS-only via :has(). The demo includes a small script for visual label feedback, toggling the .active class on the Monthly/Yearly labels as the user interacts with the toggle:

Layout Configuration

Common data attributes for pricing sections:

Element Attribute Values Description
data-layout="grid" data-layout-min CSS length (e.g., 280px) Minimum card width before wrapping.
data-layout="grid" data-layout-gap xs s m l xl Gap between grid items.
data-layout="center" data-layout-max narrow measure wide Maximum width of pricing section.
data-layout="stack" data-layout-gap xs s m l xl 2xl Vertical spacing between elements.
.pricing-card data-featured Boolean attribute Highlights the recommended plan.

Usage Notes

  • Tier naming: Use clear, hierarchical names (Basic, Pro, Enterprise) that indicate value progression.
  • Feature ordering: List features in order of importance. Lead with the most compelling features.
  • Highlight recommended: Always highlight one tier as recommended. This guides user decisions and improves conversion.
  • CTAs: Use primary buttons for the recommended plan and secondary buttons for others. Use "Contact Sales" for enterprise tiers.
  • Pricing transparency: Show all costs upfront. If there are per-user or usage-based costs, make them clear.
  • Yearly savings: When offering discounts for annual billing, display the savings prominently (e.g., "Save 20%").
  • Comparison tables: Use tables for detailed feature comparisons. Cards work better for quick overviews.
  • Mobile considerations: Cards stack naturally on mobile. Tables may need horizontal scrolling.
  • Accessibility: Use proper table semantics with scope attributes. Ensure toggle has proper labeling.

Related

Layout Grid

Grid layout element documentation

Layout Stack

Stack layout element documentation

Call to Action

CTA section patterns

Features

Feature grid patterns