Generic PDP
Product detail page core with variant selection, quantity, and buy actions.
Quickstart
- Ensure the registry is set up in Installation.
- Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/generic-pdpUsage
import { GenericPdp } from "@/components/systems/storefront/generic-pdp"
<GenericPdp
product={product}
onAddToCart={({ product, variant, quantity }) => addItem(product, variant, quantity)}
/>API Reference
| Prop | Type | Notes |
|---|---|---|
| product | StorefrontPdpProduct | Product with variants/gallery |
| initialVariantId | string | number | Default selected variant |
| initialQuantity | number | Initial quantity in buy box |
| onAddToCart | (payload) => void | Cart integration callback |