Store
Product card
The storefront tile. Five product types by three pricing models, with an optional layer action menu.
Available
Ports as-is
Dual breakpoint
Examples
Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.
Product card
Rendered live from Storybook
Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.
Props
The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.
| Prop | Type | Default | Description |
|---|---|---|---|
product* | Product | — | Undocumented — add TSDoc to the prop in the library. |
onClick | () => void | — | Undocumented — add TSDoc to the prop in the library. |
showLayerActions | boolean | — | Show 3-dot menu with layer actions (edit, remove) |
onEdit | () => void | — | Undocumented — add TSDoc to the prop in the library. |
onRemoveFromLayer | () => void | — | Undocumented — add TSDoc to the prop in the library. |
fallbackCoverImage | string | — | Cover art used when `product.coverImage` is absent. Left undefined the tile stays blank, which is the app's own empty state — pass `PLACEHOLDER_PRODUCT_COVER` to fill it. |
currencySymbol | string | "$" | Currency prefix for the default formatter. AUD by default. |
formatPrice | ProductPriceFormatter | — | Replace the price line wholesale. |
defaultMenuOpen | boolean | false | Initial open state of the layer-actions menu. Lifting this makes the open menu a static story rather than something a play function has to click open. |
menuOpen | boolean | — | Controlled open state of the layer-actions menu. |
onMenuOpenChange | (open: boolean) => void | — | Undocumented — add TSDoc to the prop in the library. |
forceActionsVisible | boolean | false | Pin the 3-dot button visible. It is hover-revealed by default, which a static snapshot can never trigger. |
className | string | — | Undocumented — add TSDoc to the prop in the library. |
editLabel | string | "Edit" | Label on the edit menu item. |
removeLabel | string | "Remove from layer" | Label on the destructive menu item. |
Reference
Transcribed from the component audit. If this disagrees with the source, the source is right.
- Source
src/components/store/ProductCard.tsx- Portability
- Copies across unchanged — only the utils import path moves.
- Responsive
- Carries a load-bearing
max-md:/md:pair. Sign off at both viewports — see the rule. - Notes
- Declares the canonical Product interface the rest of the store area builds on.