An interactive and responsive FAQ (Frequently Asked Questions) Website built with React, Vite, and Tailwind CSS. This project features smooth accordion animations, dark mode support, and an elegant UI for browsing common questions.
🔗 Live Demo: https://hsb-ini-14.github.io/faq-tailwind-website/
- 📂 Accordion-style expandable FAQ items
- 🔁 Expand All / Collapse All functionality
- 🌙 Light / Dark mode toggle (with persistence)
- 🎞️ Smooth height & opacity transitions
- 📱 Fully responsive layout
- 🎨 Styled with Tailwind CSS v4
- ⚡ Built using Vite for fast development
- React – UI components & state management
- Vite – Fast build tool & dev server
- Tailwind CSS – Utility-first styling
- Boxicons – Icon set (for expand/collapse & theme toggle)
- GitHub Pages – Deployment
faq-tailwind-website/
├── public/
├── src/
│ ├── components/
│ │ ├── FAQItem.jsx
│ │ └── FAQList.jsx
│ ├── data/
│ │ └── faqData.js
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── vite.config.js
├── package.json
├── package-lock.json
└── README.md
Follow these steps to run the project locally:
git clone https://github.com/hsb-ini-14/faq-tailwind-website.git
cd faq-tailwind-websitenpm installnpm run devOpen your browser and visit:
http://localhost:5173
This project is deployed using gh-pages.
- Install gh-pages
npm install --save-dev gh-pages- Set base path in
vite.config.js
export default defineConfig({
base: "/faq-tailwind-website/",
});- Add scripts to
package.json
"predeploy": "npm run build",
"deploy": "gh-pages -d dist"- Deploy
npm run deploy-
FAQ content is stored in a central
faqData.jsfile -
Each FAQ item is rendered using the reusable
FAQItemcomponent -
FAQListmanages open/close state and Expand All logic -
React
useStatetracks:- Currently opened FAQ item
- Expand All mode
- Dark mode toggle
-
Dark mode preference is saved to
localStorage -
Tailwind utility classes handle animations, layout, and theming
to be added later
- Icons by Boxicons
- Styling powered by Tailwind CSS
- Build tool by Vite
Harsh Singh Bhaduria
- GitHub: https://github.com/hsb-ini-14
If you like this project, consider giving it a ⭐ on GitHub — it really helps! 😊