{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "faq-section-shadcnui", "type": "registry:page", "title": "FAQ Section", "description": "Animated FAQ section with expandable questions and smooth transitions", "dependencies": [ "framer-motion", "react" ], "files": [ { "path": "@uitripled/react-shadcn/src/components/sections/faq-section.tsx", "content": "\"use client\";\n\nimport { Card, CardContent, CardHeader } from \"@/components/ui/card\";\nimport { AnimatePresence, motion } from \"framer-motion\";\nimport { ChevronDown, HelpCircle } from \"lucide-react\";\nimport { useId, useState } from \"react\";\n\nconst faqs = [\n {\n question: \"How do I get started?\",\n answer:\n \"Simply install the library using npm or yarn, import the components you need, and start building amazing interfaces!\",\n },\n {\n question: \"Is this library free to use?\",\n answer:\n \"Yes, the library is completely free and open source. You can use it in both personal and commercial projects.\",\n },\n {\n question: \"Can I customize the animations?\",\n answer:\n \"Absolutely! All components are fully customizable. You can modify colors, durations, easing functions, and more.\",\n },\n {\n question: \"Does it work with Next.js?\",\n answer:\n \"Yes, all components are fully compatible with Next.js, including both App Router and Pages Router.\",\n },\n {\n question: \"Is TypeScript supported?\",\n answer:\n \"Yes! The entire library is written in TypeScript and includes comprehensive type definitions.\",\n },\n];\n\nexport function FAQSection() {\n const [openIndex, setOpenIndex] = useState(0);\n const baseId = useId();\n\n return (\n
\n
\n \n \n \n \n

\n Frequently Asked Questions\n

\n

\n Everything you need to know about our library\n

\n \n\n
\n {faqs.map((faq, index) => {\n const questionId = `${baseId}-question-${index}`;\n const answerId = `${baseId}-answer-${index}`;\n\n return (\n \n \n \n \n setOpenIndex(openIndex === index ? null : index)\n }\n className=\"flex w-full items-center justify-between text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:ring-white/70\"\n whileHover={{ x: 4 }}\n aria-expanded={openIndex === index}\n aria-controls={answerId}\n id={questionId}\n >\n \n {faq.question}\n \n \n \n \n \n \n\n \n {openIndex === index && (\n \n \n

\n {faq.answer}\n

\n
\n \n )}\n
\n
\n \n );\n })}\n
\n
\n
\n );\n}\n", "type": "registry:page", "target": "components/uitripled/faq-section-shadcnui.tsx" } ] }