Skip to main content

ProductCard

@shopify/shop-minis-platform-sdk / components/ProductCard

BaseProductCardProps

Properties

onFavoriteToggled()?

optional onFavoriteToggled: (isFavorited) => void

Optional callback triggered when favorite state is toggled.

Parameters
ParameterType
isFavoritedboolean
Returns

void

product

product: Product

sectionId?

optional sectionId: string

Used for impression tracking

selectedProductVariant?

optional selectedProductVariant: ProductVariant

shopId

shopId: string

trackingDisabled?

optional trackingDisabled: boolean

Disables impression tracking

variant?

optional variant: "default" | "priceOverlay" | "compact"

The variant of the product card.


ProductCardProps

ProductCardProps: ProductCardPropsWithoutBadge | ProductCardPropsWithBadge


ProductCard()

ProductCard(__namedParameters): null | Element

Parameters

ParameterType
__namedParametersProductCardProps

Returns

null | Element