npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-plan-card.json --yesPlan card
ProOne plan to pick on a pricing or billing page, with its price, what it holds and its button, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- PlanPickerPlans to pick from
- PlanPeriodToggleThe period switch, centred
- PlanPeriodTextWords that differ by period
- PlanGridThe plan cards side by side in one row, 8 px apart, each an equal share of the row
- PlanCardHeaderThe card's head on its grey, 10 px down and 12 px in
- PlanCardPriceThe price row at the sheet's top
- PlanCardFeaturesThe feature list under the price, 12 px in, its lines 8 px apart
- PlanCardFeatureOne line of the list
- PlanCardFootThe card's foot, at the sheet's end
- PlanCardButtonThe plan's action, the foot's width
- usePlanPeriodThe period the nearest PlanPicker shows (
monthlyoutside one), and the call that changes it
import { usePlanPeriod } from '@/components/ui/goop/plan-card';
import { CardDescription, CardSheet, CardText, CardTitle } from '@/components/ui/goop/card';
import {
PlanCard,
PlanCardButton,
PlanCardFeature,
PlanCardFeatures,
PlanCardFoot,
PlanCardHeader,
PlanCardPrice,
PlanGrid,
PlanPeriodText,
PlanPeriodToggle,
PlanPicker,
} from '@/components/ui/goop/plan-card';
function Plans({ onChoose }: { onChoose: () => void }) {
return (
<PlanPicker defaultPeriod="yearly">
<PlanPeriodToggle offer="Two months free each year" />
<PlanGrid>
<PlanCard current>
<PlanCardHeader>
<CardText>
<CardTitle>Team</CardTitle>
<CardDescription>
<PlanPeriodText monthly="Billed monthly" yearly="Billed yearly" />
</CardDescription>
</CardText>
</PlanCardHeader>
<CardSheet>
<PlanCardPrice monthly="€14" yearly="€12">
a person a month
</PlanCardPrice>
<PlanCardFeatures>
<PlanCardFeature>Unlimited studies</PlanCardFeature>
</PlanCardFeatures>
<PlanCardFoot>
<PlanCardButton onClick={onChoose}>Current plan</PlanCardButton>
</PlanCardFoot>
</CardSheet>
</PlanCard>
</PlanGrid>
</PlanPicker>
);
}When to use
- One plan to pick on a pricing or billing page, with its price, what it holds and its button.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Plan card on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-plan-card.json --yesAdd the Goop Plan card to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { usePlanPeriod } from '@/components/ui/goop/plan-card';
import { CardDescription, CardSheet, CardText, CardTitle } from '@/components/ui/goop/card';
import {
PlanCard,
PlanCardButton,
PlanCardFeature,
PlanCardFeatures,
PlanCardFoot,
PlanCardHeader,
PlanCardPrice,
PlanGrid,
PlanPeriodText,
PlanPeriodToggle,
PlanPicker,
} from '@/components/ui/goop/plan-card';
function Plans({ onChoose }: { onChoose: () => void }) {
return (
<PlanPicker defaultPeriod="yearly">
<PlanPeriodToggle offer="Two months free each year" />
<PlanGrid>
<PlanCard current>
<PlanCardHeader>
<CardText>
<CardTitle>Team</CardTitle>
<CardDescription>
<PlanPeriodText monthly="Billed monthly" yearly="Billed yearly" />
</CardDescription>
</CardText>
</PlanCardHeader>
<CardSheet>
<PlanCardPrice monthly="€14" yearly="€12">
a person a month
</PlanCardPrice>
<PlanCardFeatures>
<PlanCardFeature>Unlimited studies</PlanCardFeature>
</PlanCardFeatures>
<PlanCardFoot>
<PlanCardButton onClick={onChoose}>Current plan</PlanCardButton>
</PlanCardFoot>
</CardSheet>
</PlanCard>
</PlanGrid>
</PlanPicker>
);
}- Fits: settings: body.
- PlanPicker: A word that differs by period (the caption's "Billed yearly") is a
PlanPeriodText. - height, width, padding, gap, corner, border, background, text, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| current? | boolean = false | This is the plan the person is on. |
- Takes every prop of Card but variant and asChild (its page: card.md)
| Part | What it is |
|---|---|
| PlanPicker | Plans to pick from; its props: plan-card--plan-picker.md |
| PlanPeriodToggle | The period switch, centred; monthly?: ReactNode = 'Pay monthly' — The monthly word, before the switch; yearly?: ReactNode = 'Pay yearly' — The yearly word, after the switch; it names the switch too; offer?: ReactNode — The offer pill's words over the switch (set in capitals); none, no pill |
| PlanPeriodText | Words that differ by period; monthly: ReactNode — The words shown while the period is monthly; yearly: ReactNode — The words shown while the period is yearly |
| PlanGrid | The plan cards side by side in one row, 8 px apart, each an equal share of the row; under the theme's narrow breakpoint (767 px) one under another |
| PlanCardHeader | The card's head on its grey, 10 px down and 12 px in |
| PlanCardPrice | The price row at the sheet's top; monthly?: ReactNode — The amount billed each month; yearly?: ReactNode — The amount (a month) when billed yearly; amount?: ReactNode — One amount for both periods |
| PlanCardFeatures | The feature list under the price, 12 px in, its lines 8 px apart; it takes the card's spare height |
| PlanCardFeature | One line of the list; lead?: boolean = false — The list's opening line: muted, no check |
| PlanCardFoot | The card's foot, at the sheet's end |
| PlanCardButton | The plan's action, the foot's width; takes asChild; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading' |
| usePlanPeriod | The period the nearest PlanPicker shows (monthly outside one), and the call that changes it |
PlanPicker
Plans to pick from.
import { PlanPicker } from '@/components/ui/goop/plan-card';Options
- period?: 'monthly' | 'yearly' — The billing period shown, when you hold it.
- defaultPeriod?: 'monthly' | 'yearly' = 'monthly' — The period shown first, when the picker holds it.
- onPeriodChange?: (period: 'monthly' | 'yearly') => void — Called with the new period when a person switches it.
Keyboard
| Key | What it does |
|---|---|
| Tab | Move to the card's button |
| Enter/Space on the card's button | Press it: the caller's action for that plan |
Accessibility
- The part itself answers the keys above.
- hover, active: the browser's own (:hover, :active): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| disabled | the prop disabled |
Motion
- The part sets its own motion: add no transition or animation of your own.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.