npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-promo-card.json --yesPromo card
ProA card that offers something (an app to download, a plan to upgrade to, a feature that is new), for a page or a settings pane, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { PromoCard } from '@/components/ui/goop/promo-card';
import { useState } from 'react';
function DesktopOffer() {
const [started, setStarted] = useState<string | null>(null);
return (
<PromoCard
eyebrow="Fieldwork desktop"
title="Plan site visits from your desk, with reminders"
description="Works offline on site; the photos sync once you are back in signal."
status={started}
icon="calendar"
actions={[
{ label: 'Download', icon: 'download', onClick: () => setStarted('The download has started.') },
{ label: 'Release notes', href: '/releases' },
]}
/>
);
}Press an action (by pointer, Enter or Space): it says what it started under the heading and is counted; switch to one action, a link, and to the card with no picture; Tab walks the actions in order. Download starts nothing and Release notes opens nothing: each press is only said and counted.
When to use
- A card that offers something (an app to download, a plan to upgrade to, a feature that is new), for a page or a settings pane.
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 Promo 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>/trail-promo-card.json --yesAdd the Goop Promo card to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { PromoCard } from '@/components/ui/goop/promo-card';
import { useState } from 'react';
function DesktopOffer() {
const [started, setStarted] = useState<string | null>(null);
return (
<PromoCard
eyebrow="Fieldwork desktop"
title="Plan site visits from your desk, with reminders"
description="Works offline on site; the photos sync once you are back in signal."
status={started}
icon="calendar"
actions={[
{ label: 'Download', icon: 'download', onClick: () => setStarted('The download has started.') },
{ label: 'Release notes', href: '/releases' },
]}
/>
);
}- Fits: settings, overview: aside.
- Put it in a page's column or a settings pane, the column's width; one card per offer. Name each action for what it does (Download, Upgrade, Release notes): two at most, the main one first. A press runs your own handler (
onClick), or followshref; say what it started instatuswhen it starts something unseen (a download). - width, gap, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| eyebrow? | ReactNode | The short line over the heading: what is offered (a product, a plan, "New"). |
| title | ReactNode | The heading: what the reader gets. |
| description? | ReactNode | A line under the heading, never cut. |
| status? | ReactNode | What an action started, said politely under the heading ("The download has started."); none at rest. |
| actions | readonly [PromoCardAction] | readonly [PromoCardAction, PromoCardAction] | One or two actions, in their order: each a button (or a link with href). |
| icon? | IconName | undefined | The pack icon the picture's tile holds, at the card's start; with none, no picture. |
- Types: PromoCardAction = { label: string; icon?: IconName | undefined; onClick?: (() => void) | undefined; href?: string | undefined }
Keyboard
| Key | What it does |
|---|---|
| Enter Space | On an action button, press it once |
| Enter | On an action link, follow it |
Accessibility
- The part itself answers the keys above.
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.