{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "faqs-5", "type": "registry:block", "description": "Responsive FAQ section with filters, search, and accordions for quick answers.", "registryDependencies": [ "accordion", "button", "input-group", "empty" ], "files": [ { "path": "registry/blocks/faqs/5/faqs-section.tsx", "content": "\"use client\";\nimport { Search, SearchSlash } from \"lucide-react\";\nimport React from \"react\";\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from \"@/components/ui/accordion\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Empty,\n EmptyContent,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n} from \"@/components/ui/empty\";\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupInput,\n} from \"@/components/ui/input-group\";\nimport { cn } from \"@/lib/utils\";\n\nexport function FaqsSection() {\n const [searchTerm, setSearchTerm] = React.useState(\"\");\n const [activeCategory, setActiveCategory] = React.useState(\"all\");\n\n const categories = [\n { id: \"all\", label: \"All\" },\n { id: \"getting-started\", label: \"Getting Started\" },\n { id: \"features\", label: \"Features\" },\n { id: \"billing\", label: \"Billing\" },\n { id: \"support\", label: \"Support\" },\n ];\n\n const filtered = faqs.filter((faq) => {\n const matchesCategory =\n activeCategory === \"all\" || faq.category === activeCategory;\n const matchesSearch =\n faq.title.toLowerCase().includes(searchTerm.toLowerCase()) ||\n faq.content.toLowerCase().includes(searchTerm.toLowerCase());\n return matchesCategory && matchesSearch;\n });\n\n return (\n
\n
\n

\n Frequently Asked Questions\n

\n

\n Find answers to common questions about Efferd. Can't find what you're\n looking for? Our support team is here to help.\n

\n\n \n setSearchTerm(e.target.value)}\n placeholder=\"Search FAQs...\"\n value={searchTerm}\n />\n \n \n \n \n
\n\n
\n\n
\n {categories.map((cat) => (\n setActiveCategory(cat.id)}\n type=\"button\"\n >\n \n {cat.label}\n \n {activeCategory === cat.id && (\n \n )}\n \n ))}\n
\n\n \n {filtered.map((faq) => (\n \n \n {faq.title}\n \n \n {faq.content}\n \n \n ))}\n \n\n {filtered.length === 0 && (\n \n \n \n \n \n No FAQs found matching your search.\n \n \n \n \n \n )}\n\n
\n

\n Can't find what you're looking for?{\" \"}\n \n Contact Us\n \n

\n
\n
\n );\n}\n\nconst faqs = [\n {\n id: 1,\n category: \"getting-started\",\n title: \"How do I create my first project?\",\n content:\n 'Click the \"New Project\" button in your dashboard, choose a template or start from scratch, customize your project name and settings, and you\\'ll be ready to start building in seconds.',\n },\n {\n id: 2,\n category: \"getting-started\",\n title: \"What are the system requirements?\",\n content:\n \"Efferd works on any modern web browser including Chrome, Firefox, Safari, and Edge. No special software installation is required—just visit our platform and log in.\",\n },\n {\n id: 3,\n category: \"features\",\n title: \"Can I use Efferd for team collaboration?\",\n content:\n \"Absolutely! Invite team members, set role-based permissions, leave comments on components, and track changes in real-time. Our collaboration features are built for teams of all sizes.\",\n },\n {\n id: 4,\n category: \"features\",\n title: \"Is there a component library?\",\n content:\n \"Yes, Efferd includes a comprehensive library of pre-built, customizable components. You can also create your own reusable components and share them across your projects.\",\n },\n {\n id: 5,\n category: \"features\",\n title: \"Do you support custom integrations?\",\n content:\n \"We support integrations with GitHub, GitLab, Figma, Slack, and major cloud providers. For custom integrations, contact our support team to discuss your needs.\",\n },\n {\n id: 6,\n category: \"billing\",\n title: \"What payment methods do you accept?\",\n content:\n \"We accept all major credit cards, PayPal, and bank transfers for annual plans. Invoicing is available for enterprise customers.\",\n },\n {\n id: 7,\n category: \"billing\",\n title: \"Can I change my plan anytime?\",\n content:\n \"Yes, you can upgrade or downgrade your plan at any time. Changes take effect immediately, and we'll prorate your billing accordingly.\",\n },\n {\n id: 8,\n category: \"support\",\n title: \"How do I report a bug?\",\n content:\n \"Use the in-app feedback button or email support@efferd.com with details about the issue. Our team typically responds within 24 hours.\",\n },\n {\n id: 9,\n category: \"support\",\n title: \"Do you offer training or onboarding?\",\n content:\n \"We provide video tutorials, documentation, and live webinars. Premium plans include personalized onboarding sessions with our support team.\",\n },\n];\n", "type": "registry:component" } ], "categories": [ "faqs" ] }