Skip to content

PlanCard

One plan: its name, price and period, who it is for, what it includes, and the way to take it. The plan most people should take is lit.

import { PlanCard, PlanCardSkeleton } from '@sypnia/ui/react'

On this page
  1. Three plans
  2. In Astro
  3. Skeleton
  4. When to use it
  5. For everyone
  6. Props

Three plans

Hobby

Your plan

Free

To try it on one project.

  • 1 project
  • 50,000 events a month
  • 7 days of history

Pro

Recommended

$29per month

For a product in production.

  • 10 projects
  • 2 million events a month
  • 90 days of history
  • Fixes written by the agent

Team

$99per month

For several teams and their products.

  • Unlimited projects
  • 10 million events a month
  • 1 year of history
  • Not included: Single sign-on
Code
import { Button, CardGrid, PlanCard } from '@sypnia/ui/react';

// Three plans; the one most people should take is lit. The person's own plan says so instead of offering itself.
export default function Plans() {
  return (
    <CardGrid min="15rem">
      <PlanCard name="Hobby" price={0} free="Free" blurb="To try it on one project." features={['1 project', '50,000 events a month', '7 days of history']} action={<Button>Start free</Button>} current />
      <PlanCard name="Pro" price={29} currency="USD" period="per month" lit blurb="For a product in production." features={['10 projects', '2 million events a month', '90 days of history', 'Fixes written by the agent']} action={<Button variant="primary">Start with Pro</Button>} />
      <PlanCard name="Team" price={99} currency="USD" period="per month" blurb="For several teams and their products." features={['Unlimited projects', '10 million events a month', '1 year of history', { text: 'Single sign-on', included: false }]} action={<Button>Start with Team</Button>} />
    </CardGrid>
  );
}

In Astro

Hobby

Free

To try it on one project.

  • 1 project
  • 50,000 events a month

Pro

Recommended

$29per month

For a product in production.

  • 10 projects
  • 2 million events a month
Code
---
// On a landing page: the same card in Astro, with no JavaScript. The button is a link in the `action` slot.
import PlanCard from '@sypnia/ui/astro/PlanCard.astro';
import CardGrid from '@sypnia/ui/astro/CardGrid.astro';
---
<CardGrid min="15rem">
  <PlanCard name="Hobby" price={0} free="Free" blurb="To try it on one project." features={['1 project', '50,000 events a month']}>
    <a slot="action" class="sy-btn sy-btn--secondary" href="#start">Start free</a>
  </PlanCard>
  <PlanCard name="Pro" price={29} currency="USD" period="per month" lit blurb="For a product in production." features={['10 projects', '2 million events a month']}>
    <a slot="action" class="sy-btn sy-btn--primary" href="#pro">Start with Pro</a>
  </PlanCard>
</CardGrid>

Skeleton

Code
import { CardGrid, PlanCardSkeleton } from '@sypnia/ui/react';

// The plans while their prices load: the same cards, the lit one included.
export default function Skeleton() {
  return <CardGrid min="15rem"><PlanCardSkeleton /><PlanCardSkeleton lit /></CardGrid>;
}

When to use it

Use it when

  • Pricing pages and the billing settings.
  • current on the person's own plan.

Do not use it when

  • Comparing many limits: use PricingTable.

For everyone

  • The name is a heading; «Recommended» and «Your plan» are words, not only light.

Props

PlanCardTypeDefault
namerequired ReactNode
pricerequired

The price as written, or a number with `currency`. 0 is «Free» when `free` is given.

ReactNode
action

The button: «Start with Pro».

ReactNode
blurb

One line: who the plan is for.

ReactNode
currency

ISO code, when `price` is a number.

string
current

The person's own plan: says so instead of offering it.

boolean
features FeatureItem[]
free

Words for a price of 0: «Free».

string
lit

The plan most people should take: lit, with «Recommended».

boolean
loading

The plan is on its way (the person's own, read from the server): the card keeps its shape, and the name, price, period, blurb, features and button are skeletons as long as the ones given (the last known, or typical ones).

boolean
period

What the price is for, as the page writes it: «per month», «per user per month», «al mes».

string
PlanCardSkeletonTypeDefault
features number 4
lit boolean
  1. Three plans
  2. In Astro
  3. Skeleton
  4. When to use it
  5. For everyone
  6. Props

    Search pages, sections and terms