BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/stackzero/review-04-block

review-04-block

stackzero/review-04-block
FreeBlock

stackzero publishes no description for this item.

Install it

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

Source

/components/commerce-ui/blocks/reviews/review-04.tsxui.stackzero.co/r/review-04-block.json
1import StarRating from "@/components/commerce-ui/star-rating-fractions";
2
3interface RatingItemProps {
4 label: string;
5 value: number;
6 isLast?: boolean;
7}
8
9interface RatingItemData {
10 label: string;
11 value: number;
12}
13
14interface Review_04Props {
15 title?: string;
16 overallRating?: number;
17 recommendPercentage?: number;
18 ratingItems?: RatingItemData[];
19}
20
21function RatingItem({ isLast, label, value }: RatingItemProps) {
22 return (
23 <div className="flex flex-col gap-2">
24 <p className="text-sm tracking-wider uppercase">
25 <span className="mr-2 font-semibold">{value}/5</span> {label}
26 </p>
27 <StarRating value={value} readOnly iconSize={16} />
28 {!isLast && (
29 <hr className="my-2 block border-t border-gray-500/50 md:hidden" />
30 )}
31 </div>
32 );
33}
34
35function Review_04({
36 overallRating = 4.4,
37 ratingItems = [
38 { label: "Quality", value: 4.5 },
39 { label: "Value", value: 4.5 },
40 { label: "Appearance", value: 4.5 },
41 { label: "Effectiveness", value: 4.5 },
42 { label: "Features", value: 4.1 },
43 { label: "Quietness", value: 4.4 },
44 ],
45 recommendPercentage = 87,
46 title = "Customer Reviews",
47}: Review_04Props = {}) {
48 return (
49 <div className="items-left flex flex-col gap-6 px-6 py-4">
50 <h1 className="mb-4 text-left text-2xl font-semibold">{title}</h1>
51 <div className="flex flex-row flex-wrap gap-12">
52 <div className="flex grow-0 flex-col justify-around gap-2">
53 <p className="text-4xl font-semibold"> {overallRating}/5</p>
54 <StarRating value={overallRating} readOnly iconSize={36} />
55 <p className="text-muted-foreground max-w-[20ch] text-sm">
56 <span className="font-semibold text-teal-500">
57 {recommendPercentage}% would recommend{" "}
58 </span>
59 this product to a friend
60 </p>
61 </div>
62 <div className="grid w-fit grid-cols-1 gap-2 md:grid-cols-3">
63 {ratingItems.map((item, index) => (
64 <RatingItem
65 key={item.label}
66 label={item.label}
67 value={item.value}
68 isLast={index === ratingItems.length - 1}
69 />
70 ))}
71 </div>
72 </div>
73 </div>
74 );
75}
76
77export default Review_04;
78export type { RatingItemData, RatingItemProps, Review_04Props };

What it pulls in

Other registry items

  • https://ui.stackzero.co/r/star-rating-fractions.json

Files it writes

  • @/components/commerce-ui/blocks/reviews/review-04.tsx

Facts

Registry
stackzero
Type
registry:block
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
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