BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/stackzero/product-variant-04-block

product-variant-04-block

stackzero/product-variant-04-block
FreeBlock

stackzero publishes no description for this item.

Install it

npx shadcn@latest add https://ui.stackzero.co/r/product-variant-04-block.json

Source

/components/commerce-ui/blocks/product-variants/product-variants-04.tsxui.stackzero.co/r/product-variant-04-block.json · first 6 KB
1"use client";
2
3import ImageViewer from "@/components/commerce-ui/image-viewer-basic";
4import PriceFormat from "@/components/commerce-ui/price-format-basic";
5import QuantityInputBasic from "@/components/commerce-ui/quantity-input-basic";
6import StarRating_Fractions from "@/components/commerce-ui/star-rating-fractions";
7import VariantSelectorBasic, {
8 VariantItem as BaseVariantItem,
9} from "@/components/commerce-ui/variant-selector-basic";
10import VariantSelectorMultiple from "@/components/commerce-ui/variant-selector-multiple";
11import { Button } from "@/components/ui/button";
12import {
13 Check,
14 ChevronLeft,
15 ChevronRight,
16 MessageSquareText,
17} from "lucide-react";
18import { useState } from "react";
19
20interface StorageVariant extends BaseVariantItem {
21 price: number;
22 salePrice?: number;
23 isInStock?: boolean;
24 availableQuantity?: number | null;
25}
26
27interface AccessoryVariant extends BaseVariantItem {
28 price: number;
29 salePrice?: number;
30}
31
32interface Testimonial {
33 name: string;
34 role?: string;
35 rating: number;
36 text: string;
37 date?: string;
38}
39
40interface VariantSelectionPayload {
41 storageVariantId: string;
42 storageVariantLabel: string;
43 storagePrice: number;
44 accessoryIds: string[];
45 accessoryLabels: string[];
46 accessoriesPrice: number;
47 quantity: number;
48 totalPrice: number;
49}
50
51interface ProductVariant04Props {
52 imageUrl?: string;
53 title?: string;
54 description?: string;
55 badge?: string | null;
56 features?: string[];
57 storageVariants: StorageVariant[];
58 accessoryVariants?: AccessoryVariant[];
59 testimonials?: Testimonial[];
60 initialStorage?: string;
61 initialAccessories?: string[];
62 defaultImage?: string;
63 onAddToCart?: (payload: VariantSelectionPayload) => void;
64 onBuyNow?: (payload: VariantSelectionPayload) => void;
65 selectedStorage?: string;
66 onStorageChange?: (storage: string) => void;
67 selectedAccessories?: string[];
68 onAccessoriesChange?: (accessories: string[]) => void;
69 quantity?: number;
70 onQuantityChange?: (quantity: number) => void;
71 isLoading?: boolean;
72 errorMessage?: string | null;
73 currencyPrefix?: string;
74}
75
76function ProductVariant_04({
77 accessoryVariants = [],
78 badge = "In Stock",
79 currencyPrefix = "$",
80 defaultImage,
81 description = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
82 errorMessage = null,
83 features = ["Feature 1", "Feature 2", "Feature 3", "Feature 4"],
84 imageUrl = defaultImage,
85 initialAccessories = [],
86// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • button
  • https://ui.stackzero.co/r/image-viewer-basic.json
  • https://ui.stackzero.co/r/price-format-basic.json
  • https://ui.stackzero.co/r/variant-selector-basic.json
  • https://ui.stackzero.co/r/variant-selector-multiple.json
  • https://ui.stackzero.co/r/star-rating-fractions.json
  • https://ui.stackzero.co/r/quantity-input-basic.json

Files it writes

  • @/components/commerce-ui/blocks/product-variants/product-variants-04.tsx

Facts

Registry
stackzero
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

ui.stackzero.co stackzero-labs/ui on GitHub Raw registry item This item as JSON

More from stackzero

All 112 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
address-01-blockaddress-01-blockstackzeroBlocksFree4 deps
address-02-blockaddress-02-blockstackzeroBlocksFree4 deps
address-03-blockaddress-03-blockstackzeroBlocksFree4 deps
banner-01-blockbanner-01-blockstackzeroBlocksFreeno deps
banner-02-blockbanner-02-blockstackzeroBlocksFreeno deps
banner-03-blockbanner-03-blockstackzeroBlocksFreeno deps
banner-04-blockbanner-04-blockstackzeroBlocksFreeno deps
banner-05-blockbanner-05-blockstackzeroBlocksFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex