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'
Three plans
Hobby
Your planFree
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.
currenton 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
| PlanCard | Type | Default |
|---|---|---|
namerequired | ReactNode | |
pricerequiredThe price as written, or a number with `currency`. 0 is «Free» when `free` is given. | ReactNode | |
actionThe button: «Start with Pro». | ReactNode | |
blurbOne line: who the plan is for. | ReactNode | |
currencyISO code, when `price` is a number. | string | |
currentThe person's own plan: says so instead of offering it. | boolean | |
features | FeatureItem[] | |
freeWords for a price of 0: «Free». | string | |
litThe plan most people should take: lit, with «Recommended». | boolean | |
loadingThe 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 | |
periodWhat the price is for, as the page writes it: «per month», «per user per month», «al mes». | string |
| PlanCardSkeleton | Type | Default |
|---|---|---|
features | number | 4 |
lit | boolean |