Skip to content

Products

Product preview card

The compact product tile used in pickers and previews.
Available
Ports as-is

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 preview 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.

PropTypeDefaultDescription
product*Product—Undocumented — add TSDoc to the prop in the library.
hrefstring—Destination for the row. Defaults to `/creator/store/{id}`, with `?space=` appended when `spaceId` is set — the same path the app's `<Link to>` built.
spaceIdstring—Space id appended as `?space=` to the default `href`. Replaces the app's `useSearchParams().get("space")`, which read live router state.
displayUrlstring—The public URL shown under the title. Defaults to `{urlHost}/{productSlug(product.id)}`.
urlHoststring"bts.space/store"Host prefix for the generated display URL.
onSelect(product: Product, event: MouseEvent<HTMLAnchorElement>) => void—Fired on activation. Call `event.preventDefault()` to suppress navigation.
fallbackCoverImagestring—Drawn in the thumbnail slot when the product has no `coverImage`.
classNamestring—Undocumented — add TSDoc to the prop in the library.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/products/ProductPreviewCard.tsx
Portability
Copies across unchanged — only the utils import path moves.