FAQ
Frequently asked questions as native expandable rows, with an intro column.
Installation
npx shadcn@latest add @venusui/faq-01Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Files added to your project
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/faq-01.tsx
Usage
The code behind the preview above.
faq-01-demo.tsx
import { Faq01 } from "@/components/faq-01"
export default function Faq01Demo() {
return <Faq01 />
}
API reference
No props. Questions are in the faqs array at the top of the file.
Requirements
lucide-react, React 19 and Tailwind CSS v4. Works in Server Components and without JavaScript.
Customization
- The answers are placeholders. Replace them with your real policies, especially refunds and licensing.
- Open a question by default by adding the
openattribute to itsdetails. - Add
name="faq"to everydetailsto allow only one open at a time (supported in current browsers).
Accessibility
- Built on
detailsandsummary, so the browser handles keyboard support and announces expanded or collapsed. - The icon is decorative; the rotation is turned off with reduced motion.
Troubleshooting
- A default triangle marker appears in Safari.
- The block hides it with
::-webkit-details-marker. Keep that class ondetails. Unknown registry "@venusui"- Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (
npx shadcn@latest), install by URL, or register it with its address:npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json. No components.json found- Run
npx shadcn@latest initin your project first.