A responsive and interactive currency converter web application built with React and Tailwind CSS. It allows users to convert between different currencies using real-time exchange rates.
- 🌍 Convert between over 160 international currencies
- 🔄 Swap "From" and "To" currencies with a single click
- 💰 Accurate conversion using real-time exchange rates
- 💡 Intelligent UI updates (e.g., swap updates input instantly)
- 📱 Fully responsive design
- ✨ Modern UI using Tailwind CSS
- React – UI library
- Tailwind CSS – Utility-first CSS framework
- Vite – Frontend tooling
- Custom Hooks – To fetch and manage API data
currency-converter/
├── public/
├── src/
│ ├── components/
│ │ └── InputBox.jsx # Custom reusable input component
│ ├── hooks/
│ │ └── useCurrencyInfo.js # Custom hook to fetch exchange rates
│ ├── App.jsx # Main application component
│ ├── main.jsx # App entry point
│ ├── index.css # Tailwind CSS config
│ └── App.css # Optional styles (can be empty)
├── index.html
├── package.json
└── vite.config.js
To run this project locally:
# 1. Clone the repository
git clone https://github.com/mohammadzaid07/currency-convertor.git
# 2. Navigate to the project folder
cd currency-converter
# 3. Install dependencies
npm install
# 4. Run the development server
npm run dev
The app will be live at http://localhost:5173
- Users select source and target currencies and enter the amount.
- The app uses a custom hook (
useCurrencyInfo
) to fetch real-time exchange rates. - Upon clicking Convert , the converted amount is displayed.
- The Swap button reverses the currency types and updates input values intelligently.
To deploy the app:
Build the application
npm run build
Then, deploy the dist/
folder to a platform like Vercel , Netlify , or GitHub Pages .