FAQ Tabs Card
Overview
A tabbed FAQ card with animated accordion answers and a support footer.
This disclosure component is intended for interfaces that need a tabbed FAQ card with animated accordion answers and a support footer, documentation pages, and support centers. Its implementation is provided as editable source so the final behavior and styling stay inside your project.
Technologies
Detected package dependencies: motion, lucide-react.
We use bank-level AES-256 encryption, SOC 2 Type II certified infrastructure, and never store your credentials. All connections use read-only access tokens. We are a SEC registered investment advisor.
Installation
Usage
import { FAQTabsCard } from "@/components/spectrumui/faq-tabs-card"<FAQTabsCard
tabs={[
{
label: "General",
faqs: [{ question: "Is my data encrypted?", answer: "Yes, at rest and in transit." }],
},
{
label: "Billing",
faqs: [{ question: "Can I cancel anytime?", answer: "Yes, from the billing page." }],
},
]}
onFooterClick={() => console.log("contact support")}
/>API Reference
FAQTabsCard
A pill tab bar switches between FAQ sets; within a set, one answer is open at a time and expands with a height animation. The footer button is a hook for a support action. Passing an empty tabs array falls back to the built-in sample content.
| Prop | Type | Default | Description |
|---|---|---|---|
tabs | { label: string; faqs: { question: string; answer: string }[] }[] | - | Tab labels with their FAQ lists |
defaultTab | number | 0 | Index of the tab selected initially |
defaultOpenIndex | number | 0 | Index of the FAQ expanded initially; -1 for none |
footerLabel | string | "Contact Support" | Footer button text |
onFooterClick | () => void | - | Fires when the footer button is pressed |
className | string | - | Additional classes merged with the root styles |
Use cases
- interfaces that need a tabbed FAQ card with animated accordion answers and a support footer
- documentation pages
- support centers
Features
- Copy-paste source that remains in your repository
- TypeScript source included with the component
- Tailwind CSS classes editable in the component source
- Animation implemented with Motion
Accessibility
- The source includes ARIA attributes or roles; preserve them when customizing the component.
- No reduced-motion marker was detected; add or verify a reduced-motion path before production use.
- Test focus order, keyboard operation, labels, contrast, and screen-reader output in the final application context.
Customization
- Edit the Tailwind utility classes in the copied source to match your spacing, color, and typography tokens.
- Use the documented className surface for local layout adjustments, then edit the source for structural changes.
- Adjust Motion transitions in the source and keep the reduced-motion behavior aligned with the final interaction.
Related components
FAQ Tabs Card FAQ
Is FAQ Tabs Card free to use in commercial projects?
Yes. The public FAQ Tabs Card source is available under the Apache License 2.0, including for commercial use, subject to the LICENSE terms.
How do I install FAQ Tabs Card?
Run npx shadcn@latest add @spectrumui/faq-tabs-card. The page also exposes the source for manual installation.
Does FAQ Tabs Card require Motion?
Yes. Motion usage was detected in the documented source or registry dependencies for FAQ Tabs Card.
Does FAQ Tabs Card use shadcn/ui or Radix UI?
No shadcn/ui or Radix UI dependency was detected in the documented FAQ Tabs Card source.
Can I use FAQ Tabs Card in Next.js?
The documented React source is used in this Next.js application. Keep its use client directive when copying it into the App Router. Install the detected dependencies and verify any application-specific data or image configuration.
What accessibility checks should I run for FAQ Tabs Card?
The source includes ARIA markup. Test the finished interface with keyboard and screen-reader workflows.