
File Encryption
WebGL
A button-controlled FAQ accordion built on Motion, with smooth or elastic opening, optional open on hover, staggered answers and muted or accent fills, for pricing pages, product objections, landing pages, and conversion-focused answer sections.
Animated FAQ is a button-controlled accordion built on Motion for objections that appear at the decision point.
Use it on pricing, landing, product, and comparison pages where the visitor needs a specific answer before clicking the CTA. The page job is objection handling: questions open cleanly, answers remain crawlable, and the interaction clarifies state. Each panel grows to its natural height with a smooth ease by default, or with springs when elastic is on (bounce sets the overshoot); after a short delay, each part of the answer fades in and rises into place one after another (stagger). An optional muted or accent fill grows down from the top of an open item, the icon is a turning chevron or a plus that turns into a minus, and openOnHover opens an item while a mouse rests on it. Only one answer is open at a time unless allowMultiple is set.
In production, the risk is turning answers into hidden decoration. Each question title is a native button with aria-expanded and aria-controls, each answer is a region labelled by its button and stays inert while closed, and with reduced motion the panel, fill, icon and answer text all change instantly, with no delay or stagger.
import AnimatedFaq from "@/components/effects/animated-faq"; const page = () => { return ( <section className="min-h-screen bg-black px-8 py-20 text-white"> <h1 className="mb-12 text-center text-5xl">Frequently asked questions</h1> <AnimatedFaq allowMultiple={false} openOnHover elastic bounce={0.3} duration={0.45} delay={0.1} stagger={0.05} fill="accent" accentColor="#ff6b00" iconMode="plus" iconPosition="right" /> </section> );}; export default page;A pricing page can place Animated FAQ below plan cards so questions about contracts, refunds, implementation, and support open exactly where hesitation appears, with fill="muted" marking the open item. The default export renders three sample questions; for your own copy, compose the FAQGroup, FAQWrapper, FAQTitle and FAQContent parts exported from the same file.
Not for hiding essential policy, pricing, support, or legal details that users must see without opening an accordion.
Keep answer panels light. Every open and close animates the panel's height with Motion, which is layout work, and each direct child of the answer gets its own fade and rise, so keep answers to a few short blocks and avoid opening many long answers at once with allowMultiple. Answer copy is normal HTML that stays in the markup when closed (collapsed to zero height), so search engines can still read it.
Each question title is a real button with aria-expanded and aria-controls pointing at its answer region, so keyboard users toggle it with Enter or Space, and closed answers are inert so focus skips them. In the default wrapper mode the whole item is also a tap target, while clicks on links or buttons inside the answer are left alone. The icon (a chevron that turns down or right, or a plus that turns into a minus) is hidden from screen readers and only mirrors the state. openOnHover reacts to a mouse only; touch screens and keyboards still open answers with a tap or the button. With reduced motion, items open and close instantly.
| Prop | Type | Default | Description |
|---|---|---|---|
allowMultiple | boolean | false | Lets more than one FAQ answer stay open at once. |
openOnHover | boolean | false | Answers open while a mouse rests on them and close when it leaves. Touch still uses taps. |
fill | string | none | A background that grows down from the top while an item is open. |
accentColor | color | #ff6b00 | Colour of the accent fill. |
duration | number | 0.45 | Open and close animation duration. |
elastic | boolean | false | Springs instead of easing for the panel, fill, line and content. |
bounce | number | 0.3 | How much the springs overshoot. Needs Elastic. |
delay | number | 0.1 | Seconds before the answer starts to appear. |
stagger | number | 0.05 | Seconds between each part of the answer appearing. |
showIcon | boolean | true | Shows or hides the FAQ trigger icon. |
iconPosition | string | right | Side where the trigger icon is rendered. |
iconMode | string | rotate | Icon animation: a chevron that turns down or right, or a plus that turns into a minus. |
Animated FAQ uses the button-controlled accordion pattern: each question title is a native <button> with aria-expanded and aria-controls, and each answer is a region labelled by that button and made inert while closed. In the default "wrapper" mode, clicking anywhere on the item also toggles it as a pointer convenience (clicks on links or buttons inside it are ignored); set toggleOn="title" on FAQWrapper to limit toggling to the button. Keep that button rather than swapping in generic div toggles, and treat openOnHover as an extra for mouse users, not a replacement for it.
Place it near pricing, lead-capture, or product proof where visitors hesitate. It is strongest for objections, not generic educational content.
Yes. Answers are rendered as HTML even while closed (collapsed to zero height and made inert rather than removed), so search engines can read them. Opening an answer needs JavaScript, so keep anything essential visible outside the accordion.
Yes. A custom version should define content structure, accessibility behavior, motion rules, reduced-motion behavior, source handoff, and implementation notes for the specific page job.
Need a custom effect? Tell us what to create.