Free
$0/yr
MIT, forever
- 102 primitives, no account, no token
- Runtime, GSAP and Lenis adapters
- Public shadcn registry
- MCP server
Shows pricing plans side by side, with an annual/monthly toggle that swaps every price with zero JavaScript (radios and :has), the highlighted plan wearing a travelling border beam, cards revealed with a stagger. Plans with no monthly price render without the toggle.
$0/yr
MIT, forever
$129/yr
One person, billed yearly
$349/yr
Up to 10 people, one invoice
Live, from the library itself, at full size: scroll, hover, navigate away and back. The demo is never gated.
Variants · each row writes the attribute the prop writes; the section's own CSS answers
JavaScript of its own
0 B
Uses Reveal and the shared runtime (1.9 kB raw, once per site). With those included: 3.0 kB raw.
CSS 13.1 kB raw including the base tokens. Measured from a production build, and again in CI for every change that can move it.
Browser support
Chrome 105 · Firefox 128 · Safari 16.4; needs has, property. Elsewhere: a static ring on the highlighted plan.
The demo above is never gated; the source is. With a key in components.json (see account), the registry serves it like any other item:
npx shadcn@latest add @moonarc-pro/pricing-cards---
import PricingCards from '@/components/moonarc/pro/PricingCards.astro';
---
<PricingCards plans={[
{ name: 'Starter', monthly: 0, annual: 0, features: ['3 projects', 'Community support'], action: { href: '/signup/', label: 'Start' } },
{ name: 'Plus', monthly: 12, annual: 120, features: ['Unlimited projects', 'Priority support'], action: { href: '/checkout/', label: 'Subscribe' }, highlight: true },
]} />Without a key the registry answers 401 with an upgrade message. Everything this section composes is free: reveal, border-beam.
| Prop | Type | Default | Description |
|---|---|---|---|
plans | { name, monthly?, annual, blurb?, features, action, highlight? }[] | none | Plans; one can be highlighted. Leave out `monthly` on every plan for yearly-only pricing: the toggle is not rendered and each card shows its yearly price. |
currency | string | '$' | Currency symbol. |
priceFormat | string | '{currency}{n}' | How a price prints: {currency} is the currency prop and {n} the amount, so '{n} {currency}' puts the symbol after it. |
locale | string | unset (the number as given) | Intl locale of the amount: its thousands separator and digits. |
perYear | string | '/yr' | The small text after the yearly price. |
perMonth | string | '/mo' | The small text after the monthly price. |
annualLabel | string | 'Annual' | The toggle's yearly choice. |
monthlyLabel | string | 'Monthly' | The toggle's monthly choice. |
billingLabel | string | 'Billing period' | Accessible name of the toggle's group. |
id | string | 'ma-pricing' | Radio group prefix; unique per page. |
tone | 'surface' | 'muted' | 'ink' | 'brand' | unset (paints nothing) | The ground: the page surface, a muted band, an always-dark ink panel, or a deep brand panel. Each paints --background, --ma-tone-muted (over --muted, with a --border hairline), --ma-tone-ink or --ma-tone-brand (over --primary) with the matching text. With theme.css, a painted tone also re-declares --card, --border, --input and --ring inside the section, so cards and fields follow the ground. Decoration is strongest on brand. |
density | 'compact' | 'cozy' | 'roomy' | 'cozy' | Card padding and gaps ×0.8 / ×1 / ×1.25 through --ma-density. |
The section reads the theme contract (shadcn's variable names with the base tokens as fallback), so a pasted theme or one --ma-brand recolours it. Its class names are the override surface and stay stable; a named slot replaces the matching prop with your own markup.
.ma-pricing.ma-pricing__action.ma-pricing__annual.ma-pricing__aside.ma-pricing__billing.ma-pricing__blurb.ma-pricing__copy.ma-pricing__eyebrow.ma-pricing__features.ma-pricing__head.ma-pricing__headline.ma-pricing__monthly.ma-pricing__name.ma-pricing__plan.ma-pricing__plans.ma-pricing__price
slot="eyebrow"slot="headline"slot="copy"slot="aside"
Cards fade in without stagger; the beam stops.
ClientRouterInherits Reveal and BorderBeam; the toggle is a radio and resets with the page.
Replaces: Pricing sections (Tailwind Plus) · Pricing (shadcnblocks). See the migration table.
A beam of light travels around the edge of a card.
Entrance on scroll that plays once and stays, staggers its children, scrubs with the scroll position when asked, honours reduced motion, and keeps working after every ClientRouter navigation.
Compares your product with others in an "us versus them" table.
A feature-by-plan comparison: the highlighted plan's column lit, rows revealed with a 40 ms stagger as the table scrolls into view, and a header row that sticks when you cap the table's height.
Also: view transitions · how costs are measured · browser support · accessibility policy · five-minute setup · MCP for agents · this page as Markdown