Skip to content
VenusUI
Get started

FAQ

Frequently asked questions as native expandable rows, with an intro column.

Preview

Installation

npx shadcn@latest add @venusui/faq-01

Run 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 open attribute to its details.
  • Add name="faq" to every details to allow only one open at a time (supported in current browsers).

Accessibility

  • Built on details and summary, 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 on details.
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 init in your project first.