FAQ
Dependencies
npmi framer-motion
npminstall @heroicons/react
Configuration and Re-usability
FAQData.tsx
:
Usage Methods
- Data externalisation: As with the footer, you could outsource the
faqData
to a JSON file or from the API. This makes it easy to update the faqData without touching the component code. - Customisable transitions: Allow to pass their own animation configurations via a prop such as
animationSettings
, which could control the duration and types of transitions used. - Add props such as
questionStyle
,answerStyle
, andcontainerStyle
to allow the appearance of the component to be customised, so that it easily adapts to various themes or designs.