FAQ

An expandable accordion FAQ component with smooth spring height calculation, single/multi-open modes, category filtering, search, and full ARIA keyboard accessibility.

You can install any component directly using the official shadcn CLI: "npx shadcn@latest add Surajmaurya1/easyui/<component-name>".

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/faq

API Reference

PropTypeDefaultDescription
itemsFAQItem[][]Array of FAQ items with id, question, answer, category, badge, icon
allowMultiplebooleanfalseAllows multiple accordion items to remain open simultaneously
defaultOpenstring[] | stringundefinedDefault expanded item ID(s) on initial mount
openIdsstring[]undefinedControlled list of currently expanded item IDs
onOpenChange(ids: string[]) => voidundefinedCallback fired when open item selection changes
iconStyle'chevron' | 'plus-minus' | 'custom''chevron'Indicator icon style
searchablebooleanfalseDisplays search filter bar above FAQ items
showCategoriesbooleanfalseDisplays category filter pills above items
variant'unified' | 'separated''unified'Visual presentation layout