{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "testimonial-section-shadcnui", "type": "registry:page", "title": "Testimonial Section", "description": "Carousel-style testimonial section with smooth transitions", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/sections/testimonial-section.tsx", "content": "\"use client\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n} from \"@/components/ui/card\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { ChevronLeft, ChevronRight, Quote, Star } from \"lucide-react\";\nimport { useState } from \"react\";\n\nconst testimonials = [\n {\n id: 1,\n name: \"Sarah Johnson\",\n role: \"CEO, TechCorp\",\n content:\n \"This library has transformed how we build user interfaces. The animations are smooth, professional, and easy to implement.\",\n rating: 5,\n },\n {\n id: 2,\n name: \"Michael Chen\",\n role: \"Lead Developer, StartupXYZ\",\n content:\n \"Best animation library we've used. The components are production-ready and the documentation is excellent.\",\n rating: 5,\n },\n {\n id: 3,\n name: \"Emily Rodriguez\",\n role: \"Designer, Creative Studio\",\n content:\n \"Beautiful animations that bring our designs to life. Highly recommended for any modern web project.\",\n rating: 5,\n },\n];\n\nexport function TestimonialSection() {\n const [currentIndex, setCurrentIndex] = useState(0);\n\n const nextTestimonial = () => {\n setCurrentIndex((prev) => (prev + 1) % testimonials.length);\n };\n\n const prevTestimonial = () => {\n setCurrentIndex(\n (prev) => (prev - 1 + testimonials.length) % testimonials.length\n );\n };\n\n return (\n
\n
\n \n

\n What Our Users Say\n

\n

\n Don't just take our word for it - hear from our community\n

\n \n\n
\n \n \n \n \n
\n {[...Array(testimonials[currentIndex].rating)].map(\n (_, i) => (\n \n \n \n )\n )}\n
\n \n \n \n
\n \n \n {testimonials[currentIndex].content}\n \n
\n
\n

\n {testimonials[currentIndex].name}\n

\n

\n {testimonials[currentIndex].role}\n

\n
\n
\n
\n
\n \n
\n\n
\n \n \n \n\n
\n {testimonials.map((_, index) => (\n setCurrentIndex(index)}\n className=\"h-2 rounded-full\"\n whileHover={{ scale: 1.2 }}\n whileTap={{ scale: 0.9 }}\n initial={{ width: 8 }}\n animate={{ width: index === currentIndex ? 24 : 8 }}\n style={{\n backgroundColor:\n index === currentIndex\n ? \"rgb(var(--accent))\"\n : \"rgb(var(--border))\",\n }}\n />\n ))}\n
\n\n \n \n \n
\n
\n
\n
\n );\n}\n", "type": "registry:page", "target": "components/uitripled/testimonial-section-shadcnui.tsx" } ] }