Skip to content

Pricing Credits

Pay-as-you-go pricing: four glass radio cards of recording-hour packs (tags like Popular / Best value) feeding a gradient summary card with price, per-hour cost, inclusions and CTA.

glass/section/pricing-credits
Open ↗

Source

"use client";

import { useId, useState } from "react";
import { Sparkles } from "lucide-react";
import { cn } from "@/lib/utils";

export interface PricingCreditsPack {
  hours: number;
  price: number;
  tag?: string;
}

export interface PricingCreditsProps {
  eyebrow?: string;
  title?: string;
  description?: string;
  packs?: PricingCreditsPack[];
  defaultIndex?: number;
  currency?: string;
  cta?: { label: string; href: string };
  className?: string;
}

const GLASS = "da-stroke bg-da-surface backdrop-blur-da backdrop-saturate-150";

/** Pay-as-you-go pricing: selectable glass packs of recording hours (radio cards) feeding a gradient summary card with per-hour price. */
export function PricingCredits({
  eyebrow = "Pay as you go",
  title = "Only pay for the meetings you record",
  description = "Buy hours once, use them any time within 12 months. No seats, no subscription.",
  packs = [
    { hours: 10, price: 15 },
    { hours: 40, price: 48, tag: "Popular" },
    { hours: 100, price: 99 },
    { hours: 300, price: 240, tag: "Best value" },
  ],
  defaultIndex = 1,
  currency = "$",
  cta = { label: "Buy hours", href: "#buy" },
  className,
}: PricingCreditsProps) {
  const [sel, setSel] = useState(defaultIndex);
  const id = useId();
  const pack = packs[sel] ?? packs[0]!;
  const perHour = pack.price / pack.hours;

  return (
    <section aria-labelledby={`${id}-t`} className={cn("da-section text-da-fg", className)}>
      <div className="da-container">
        <div className="mx-auto max-w-2xl text-center">
          <p className="text-sm font-semibold text-da-primary">{eyebrow}</p>
          <h2 id={`${id}-t`} className="mt-3 font-da-display text-[clamp(2rem,4.5vw,3.25rem)] leading-[1.08] font-semibold tracking-da-display text-balance">
            {title}
          </h2>
          <p className="mt-4 text-lg text-da-muted-fg">{description}</p>
        </div>
        <div className="mx-auto mt-12 grid max-w-4xl gap-6 lg:grid-cols-[1.4fr_1fr]">
          <fieldset>
            <legend className="sr-only">Choose a pack of hours</legend>
            <div className="grid grid-cols-2 gap-3">
              {packs.map((p, i) => (
                <label
                  key={p.hours}
                  className={cn(
                    "da-transition relative cursor-pointer rounded-da-lg p-5 shadow-da-sm has-focus-visible:ring-(length:--da-ring-width) has-focus-visible:ring-da-ring",
                    GLASS,
                    i === sel && "shadow-da-md ring-2 ring-da-primary",
                  )}
                >
                  <input type="radio" name={id} checked={i === sel} onChange={() => setSel(i)} className="sr-only" />
                  {p.tag && (
                    <span className="absolute -top-2.5 right-3 rounded-da-pill bg-gradient-to-r from-da-primary to-da-accent px-2 py-0.5 text-[10px] font-semibold text-da-primary-fg">
                      {p.tag}
                    </span>
                  )}
                  <span className="block font-da-display text-3xl font-semibold tracking-da-display">{p.hours}h</span>
                  <span className="mt-1 block text-sm text-da-muted-fg">
                    {currency}
                    {p.price} · {currency}
                    {(p.price / p.hours).toFixed(2)}/h
                  </span>
                </label>
              ))}
            </div>
          </fieldset>
          <div className="relative overflow-hidden rounded-da-lg bg-gradient-to-br from-da-primary to-da-accent p-6 text-da-primary-fg shadow-da-lg">
            <div aria-hidden className="absolute -top-16 -right-16 size-48 rounded-full bg-da-primary-fg/20 blur-2xl" />
            <p className="relative flex items-center gap-2 text-sm font-semibold">
              <Sparkles aria-hidden className="size-4" /> Your pack
            </p>
            <p className="relative mt-4 font-da-display text-5xl font-semibold tracking-da-display" aria-live="polite">
              {currency}
              {pack.price}
            </p>
            <p className="relative mt-1 text-sm opacity-90">
              {pack.hours} hours · {currency}
              {perHour.toFixed(2)} per hour
            </p>
            <ul className="relative mt-5 space-y-1.5 text-sm">
              <li>✓ ~{Math.round(pack.hours * 2)} meetings of 30 min</li>
              <li>✓ Recaps, search and video included</li>
              <li>✓ Valid 12 months</li>
            </ul>
            <a
              href={cta.href}
              className="da-focus da-transition relative mt-6 flex h-11 items-center justify-center rounded-da-pill bg-da-primary-fg font-semibold text-da-primary hover:-translate-y-0.5"
            >
              {cta.label}
            </a>
          </div>
        </div>
      </div>
    </section>
  );
}

export default PricingCredits;

modules/glass/section/pricing-credits/index.tsx

Props

PropTypeDefaultDescription
eyebrow / title / descriptionstring—Header.
packs{ hours, price, tag? }[]—Packs.
defaultIndexnumber1Initial pack.
currencystring"$"Symbol.
cta{ label, href }—Buy link.
classNamestring—Classes.

Other pricing variants in Glass

Pricing in other art directions

Pricing Comparison

Full feature matrix: ruled table with plan headers (price + CTA, highlighted plan in yellow), ink group separator rows and check / dash / text values, horizontally scrollable on mobile.

BrutalistPricing

Pricing Single

Single-plan pricing card: giant price on a yellow panel, numbered feature grid on paper, full-width ink CTA, guarantee line and a rotated pink discount sticker.

BrutalistPricing

Pricing Slider

Usage-based pricing calculator: chunky range slider with a square yellow thumb, live per-unit and total price (volume tiers), included-features list and an ink CTA bar.

BrutalistPricing

Pricing Tiers

Three plans glued together in one ruled strip, the highlighted plan pops out in solid yellow with a rotated badge. Monthly/yearly toggle with discount chip, custom-price plan support.

BrutalistPricing

Pricing Columns

Three quiet pricing columns with a segmented monthly/yearly control, per-seat units, and a featured plan lifted by a ring, soft shadow and an indigo hairline highlight on top.

MinimalPricing

Pricing Rows

Plans stacked as full-width horizontal rows (name + description, highlight chips, price, CTA), the featured one ringed in indigo, followed by an inverted ink enterprise strip.

MinimalPricing

Pricing Table

Full plan comparison table: four plan columns with price and CTA in the header, grouped feature rows with checks, dashes or values, featured column tinted; horizontally scrollable on small screens.

MinimalPricing

Pricing Usage

Seat-based pricing calculator: range slider for responders, four volume tiers with the active one highlighted, monthly/yearly toggle and a live estimated total panel with inclusions and CTA.

MinimalPricing

Pricing Columns

Three plan columns separated by hairlines (no cards): mono plan name, huge price, note, ruled feature list and a button; the featured plan has an ink button and a signal dot.

Mono CleanPricing

Pricing One

Single-price poster: a gigantic price set in the display face across the left, and on the right a short pitch, a two-column “included” list with en-dashes and an ink CTA; separated by a full-ink rule.

Mono CleanPricing

Pricing Table

Plain typographic comparison table: ink header rule, mono column heads, hairline rows, em-dash for absent features, and the featured column marked with a signal dot.

Mono CleanPricing

Pricing Toggle

Pricing as a ruled list: a text toggle “Monthly / Yearly (−20%)” with an underline on the active option, then one row per plan — name, blurb, price, arrow link — rows invert on hover.

Mono CleanPricing

Pricing Fees

Pay-as-you-go fee sheet: big per-method rates in bordered cells (4-up), then a “no hidden fees” checklist band.

Neo CorporatePricing

Pricing Matrix

Enterprise feature matrix: sticky-looking header row of plans, grouped rows with section headings, checks/dashes/values and a tinted featured column.

Neo CorporatePricing

Pricing Tiers

Three bordered tiers with a monthly/annual segmented toggle; the featured tier has a blue top bar and “Most popular” badge; enterprise shows “Custom”.

Neo CorporatePricing

Pricing Volume

Volume-based fee calculator: stepped slider of monthly payment volume, the blended rate tier highlighted in a tier table, and an estimated monthly fee vs. a typical 2.9% processor.

Neo CorporatePricing

Pricing Compare

Soft comparison table: rounded card, plan names in serif with prices, zebra rows in warm tints, sage check circles and dashes, highlighted featured column.

Organic SoftPricing

Pricing Single

One honest plan: a wide rounded card split into a sage-tinted price side (big serif price, CTA, guarantee) and a two-column “everything included” list.

Organic SoftPricing

Pricing Team

Team-size calculator: a warm range slider (10–500 people) drives a big serif monthly price, annual saving line and a sapling illustration that grows with team size.

Organic SoftPricing

Pricing Tiers

Three rounded plans on cream; the middle one sits on a deep sage card (inverted colors) lifted slightly higher, with a leaf ribbon; checklists use soft tinted checks.

Organic SoftPricing

Pricing Cards

Three rounded plan cards with emoji (Sprout, Bloom, Forest), a pill monthly/yearly toggle, mint tick lists, and the featured plan filled in lavender with a tilted butter “Most loved” sticker.

Soft FlatPricing

Pricing Compare

Rounded comparison table inside a white card: soft zebra rows, round mint check and grey dash badges, and a lavender featured column with rounded head.

Soft FlatPricing

Pricing Duo

Two big plan blocks side by side: a mint “Free” block and a periwinkle “Pro” block with light text, huge rounded prices, round-tick feature lists and contrasting pill CTAs.

Soft FlatPricing

Pricing Team

Team-size price calculator: big round −/+ stepper around an editable number, avatar dots popping in for each person (paid seats ringed), and a butter summary card with the live monthly total.

Soft FlatPricing