PlanCard
Un plan: su nombre, precio y período, para quién es, qué incluye y cómo tomarlo. El plan que la mayoría debería tomar va iluminado.
import { PlanCard, PlanCardSkeleton } from '@sypnia/ui/react'
En esta página
Tres planes
Hobby
Tu planFree
To try it on one project.
- 1 project
- 50,000 events a month
- 7 days of history
Pro
Recomendado29 US$per month
For a product in production.
- 10 projects
- 2 million events a month
- 90 days of history
- Fixes written by the agent
Team
99 US$per month
For several teams and their products.
- Unlimited projects
- 10 million events a month
- 1 year of history
- No incluido: Single sign-on
Código
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>
);
} En Astro
Hobby
Free
To try it on one project.
- 1 project
- 50,000 events a month
Pro
Recomendado29 US$per month
For a product in production.
- 10 projects
- 2 million events a month
Código
---
// 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
Código
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>;
} Cuándo usarlo
Úsalo cuando
- Páginas de precios y la configuración de facturación.
currenten el plan propio de la persona.
No lo uses cuando
- Comparar muchos límites: usa PricingTable.
Para todos
- El nombre es un encabezado; «Recomendado» y «Tu plan» son palabras, no solo luz.
Props
| PlanCard | Tipo | Por defecto |
|---|---|---|
nameobligatorio | ReactNode | |
priceobligatorioThe 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 | Tipo | Por defecto |
|---|---|---|
features | number | 4 |
lit | boolean |