Skip to content
Viewership Inquire
Astro UI

Pricing Toggle.

Plans with a monthly or yearly switch built from native radios and CSS. No JavaScript.

PricingSection2 dependencies Original, MIT

.md

Gear club membership.

Rentals, repairs and member pricing in one subscription. Sample prices.

Billing period
  • Weekend

    For a few trips a year.

    $9 / month $90 / year

    • Two rentals a month
    • 10% off repairs
    • Member events
  • Guide

    For guides and instructors.

    $39 / month $390 / year

    • Everything in Trail
    • Fleet discounts
    • Loaner kit on request
Style

Using Claude Code? Give it the agent prompt and skip these steps.

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy PricingToggle.astro

    Paste into src/components/viewership/pricing-toggle/

  3. Copy its dependencies

    Each in its own folder, next to this one.

  4. Use it

    Page.astro
    ---
    import PricingToggle from "../components/viewership/pricing-toggle/PricingToggle.astro";
    ---
    
    <PricingToggle />

Props 8

PropTypeDefaultDescription
title string · Section headline.
accent string · Closing words of the headline.
intro string · Supporting paragraph.
tiers { name: string; monthly: string; yearly: string; description?: string; features: string[]; cta: { label; href }; featured?: boolean }[] · Plans with both prices.
saving string · Badge beside the yearly option, e.g. "Save 20%".
monthlyLabel string "Monthly" Label for the monthly option.
yearlyLabel string "Yearly" Label for the yearly option.
as "h2" | "h3" "h2" Heading element.

Source 1 file

Original, MIT.