{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "complex-product-description-01", "type": "registry:block", "description": "Product description with accordion", "registryDependencies": [ "accordion", "button" ], "files": [ { "path": "creative-tim-ui/blocks/complex-product-description-01/page.tsx", "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Heart, Package, RefreshCw, Shield, Star, Truck } from \"lucide-react\"\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from \"@/components/ui/accordion\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\n\nconst IMAGES = [\n \"https://v3.material-tailwind.com/coat-1.png\",\n \"https://v3.material-tailwind.com/coat-2.png\",\n \"https://v3.material-tailwind.com/coat-3.png\",\n \"https://v3.material-tailwind.com/coat-4.png\",\n]\n\nconst SIZES = [\"XS\", \"S\", \"M\", \"L\", \"XL\"]\n\nconst COLORS = [\n { name: \"Black\", hex: \"#1a1a1a\" },\n { name: \"White\", hex: \"#ffffff\" },\n { name: \"Gray\", hex: \"#e5e7eb\" },\n]\n\nconst FEATURES = [\n { icon: Package, text: \"Premium quality materials\" },\n { icon: Truck, text: \"Free shipping on orders $100+\" },\n { icon: RefreshCw, text: \"30-day return policy\" },\n { icon: Shield, text: \"2-year warranty included\" },\n]\n\nconst ACCORDION_DATA = [\n {\n value: \"one\",\n title: \"Features\",\n desc: \"This premium coat is crafted from weather-resistant fabric with advanced Gore-Tex technology, ensuring you stay dry and comfortable in all conditions. Features include adjustable cuffs, reinforced seams, and breathable lining.\",\n },\n {\n value: \"two\",\n title: \"Product Care\",\n desc: \"Machine wash cold with like colors. Use mild detergent and avoid bleach. Tumble dry on low heat or hang to dry. For best results, store in a cool, dry place and avoid direct sunlight to maintain color and fabric integrity.\",\n },\n {\n value: \"three\",\n title: \"Shipping & Returns\",\n desc: \"Free standard shipping on orders over $100. Express shipping available at checkout. We offer a 30-day return policy with free returns. Items must be unworn, unwashed, and in original packaging with tags attached.\",\n },\n {\n value: \"four\",\n title: \"Warranty\",\n desc: \"All our products come with a comprehensive 2-year warranty covering manufacturing defects. This includes issues with stitching, zippers, and fabric quality. Contact our customer service for warranty claims and support.\",\n },\n]\n\nexport default function ComplexProductDescription01() {\n const [selectedImage, setSelectedImage] = useState(0)\n const [selectedColor, setSelectedColor] = useState(0)\n const [selectedSize, setSelectedSize] = useState(\"M\")\n const [isFavorite, setIsFavorite] = useState(false)\n\n return (\n
\n
\n
\n
\n
\n {IMAGES.map((img, index) => (\n setSelectedImage(index)}\n className={`h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg border-2 transition-all ${\n selectedImage === index\n ? \"border-neutral-900\"\n : \"border-neutral-200 hover:border-neutral-400\"\n }`}\n >\n \n \n ))}\n
\n\n
\n
\n \n
\n
\n
\n\n
\n \n New Arrival\n \n\n

\n Premium Winter Coat\n

\n\n
\n \n $1,490.00\n \n
\n
\n {[...Array(5)].map((_, i) => (\n \n ))}\n
\n (100 reviews)\n
\n
\n\n

\n Experience unparalleled comfort and style with our premium winter\n coat. Meticulously crafted with attention to detail, this coat\n features weather-resistant fabric and a timeless design that\n complements any wardrobe. Perfect for both casual and formal\n occasions.\n

\n\n
\n

\n Color:{\" \"}\n \n {COLORS[selectedColor].name}\n \n

\n
\n {COLORS.map((color, index) => (\n setSelectedColor(index)}\n className={`h-10 w-10 rounded-md border-2 transition-all ${\n selectedColor === index\n ? \"border-neutral-900 ring-2 ring-neutral-900 ring-offset-2\"\n : \"border-neutral-200 hover:border-neutral-400\"\n }`}\n style={{ backgroundColor: color.hex }}\n title={color.name}\n />\n ))}\n
\n
\n\n
\n

\n Size: {selectedSize}\n

\n
\n {SIZES.map((size) => (\n setSelectedSize(size)}\n className={`flex h-10 w-12 items-center justify-center rounded-md border-2 text-sm font-medium transition-all ${\n selectedSize === size\n ? \"border-neutral-900 bg-neutral-900 text-white\"\n : \"border-neutral-200 bg-white text-neutral-900 hover:border-neutral-400\"\n }`}\n >\n {size}\n \n ))}\n
\n
\n\n
\n \n Add to Cart\n \n setIsFavorite(!isFavorite)}\n >\n \n \n
\n\n
\n {FEATURES.map((feature, index) => (\n \n \n {feature.text}\n
\n ))}\n
\n\n \n {ACCORDION_DATA.map(({ value, title, desc }) => (\n \n \n {title}\n \n \n {desc}\n \n \n ))}\n \n
\n
\n \n
\n )\n}\n", "type": "registry:page", "target": "app/complex-product-description/page.tsx" } ], "meta": { "iframeHeight": "1200px", "container": "w-full bg-surface min-h-svh flex px-4 py-12 items-center md:py-20 justify-center min-w-0", "mobile": "component" }, "categories": [ "ecommerce" ] }