Staaarter

Credits Pay As You Go

Usage-based, pay-as-you-go pricing block for products billed by credits rather than a flat subscription. Shows several credit-bundle tiers with their price and per-unit rate, plus a short explainer panel describing what a single credit is spent on.

By Staaarter Team
Pricing
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/credits-pay-as-you-go.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/pricing/pricing15.tsx instead.

Usage

The file also exports pricing15Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Pricing15, pricing15Demo } from "@/components/blocks/pricing/pricing15";

export default function Page() {
  return <Pricing15 {...pricing15Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodenoneMain section headline.
descriptionstringundefinedSupporting subtext below the heading.
bundlesPricing15Bundle[]noneCredit bundle tiers to render.
usageExamplesstring[][]Short bullet list of what a credit is used for; the explainer panel only renders when this is non-empty.
usageHeadingstring"What's a credit?"Heading for the usage-explainer panel.
classNamestringnoneExtra classes for the outer section element.

Types

type Pricing15Bundle = {
  credits: string;
  price: string;
  perUnit?: string;
  highlighted?: boolean;
  badgeLabel?: string;
  cta: { label: string; href?: string };
};

Behavior notes

  • This block is fully static presentation, there is no real credit balance, purchase flow, or usage metering behind it.
  • The usage-explainer panel only renders when `usageExamples` is supplied, matching the optional-section pattern used elsewhere in this category.
  • All CTA buttons are inert placeholders (href defaults to "#" in the demo) with no real checkout wired up.