A modern, responsive currency converter application built with React and TailwindCSS. Convert between 34+ world currencies with real-time exchange rates, featuring a beautiful UI with dark mode support.
- ๐ 34+ Currencies - Support for all major world currencies
- ๐ Flag Emojis - Visual currency identification with country flags
- ๐ Searchable Dropdowns - Quick currency search and selection
- ๐ฑ Real-time Rates - Live exchange rates from ExchangeRate-API
- โก Instant Conversion - Fast and accurate currency conversion
- ๐ Swap Currencies - One-click currency swap with smooth animation
- ๐ Exchange Rate Display - Shows current rate and last update time
- ๐ Dark/Light Mode - Toggle between themes with persistence
- ๐ฑ Fully Responsive - Works perfectly on mobile, tablet, and desktop
- ๐จ Modern Design - Gradient backgrounds with glassmorphism effects
- โจ Smooth Animations - Fade-in effects and animated blob backgrounds
- ๐ฏ User-Friendly - Clean interface with intuitive controls
โ ๏ธ Error Handling - Clear error messages for network issues- ๐พ LocalStorage - Remembers last conversion and theme preference
Beautiful gradient interface with clean design
Eye-friendly dark theme for night-time use
Optimized layout for all screen sizes
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd currencyConvertor
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Open in browser
Navigate to http://localhost:5173
- Enter Amount - Type the amount you want to convert
- Select Source Currency - Choose the currency you're converting from (e.g., USD)
- Select Target Currency - Choose the currency you're converting to (e.g., EUR)
- Click Convert - Get instant conversion results
- View Results - See converted amount with exchange rate
- Swap Currencies - Click the
โ๏ธ button to quickly swap source/target currencies - Toggle Dark Mode - Click the ๐/โ๏ธ icon in top-right corner
- Search Currencies - Use the search box in dropdowns to find currencies quickly
- Auto-save - Your last conversion is automatically saved and restored on page reload
- React 19.1.1 - Modern UI library with hooks
- Vite 7.1.5 - Lightning-fast build tool and dev server
- TailwindCSS 4.1.13 - Utility-first CSS framework
- Custom CSS - Keyframe animations and transitions
- ExchangeRate-API - Real-time currency exchange rates
- Axios - HTTP client for API requests
- Lucide React - Beautiful, consistent icon set
- ESLint - Code quality and consistency
- Hot Module Replacement (HMR) - Instant updates during development
currencyConvertor/
โโโ src/
โ โโโ components/
โ โ โโโ CurrencyConverter.jsx # Main converter component
โ โ โโโ CurrencyDropdown.jsx # Searchable currency selector
โ โ โโโ ThemeToggle.jsx # Dark mode toggle
โ โโโ hooks/
โ โ โโโ useCurrencyConverter.js # Conversion logic
โ โ โโโ useLocalStorage.js # LocalStorage persistence
โ โโโ utils/
โ โ โโโ currencyData.js # Currency data & formatters
โ โ โโโ api.js # API integration
โ โโโ App.jsx # Main app component
โ โโโ index.css # Global styles & animations
โ โโโ main.jsx # Entry point
โโโ public/ # Static assets
โโโ index.html # HTML template
โโโ package.json # Dependencies
โโโ vite.config.js # Vite configuration
โโโ README.md # This file
The app supports 34 major world currencies:
๐บ๐ธ USD โข ๐ช๐บ EUR โข ๐ฌ๐ง GBP โข ๐ฏ๐ต JPY โข ๐ฆ๐บ AUD โข ๐จ๐ฆ CAD โข ๐จ๐ญ CHF โข ๐จ๐ณ CNY โข ๐ฎ๐ณ INR โข ๐ฒ๐ฝ MXN โข ๐ง๐ท BRL โข ๐ฟ๐ฆ ZAR โข ๐ท๐บ RUB โข ๐ฐ๐ท KRW โข ๐ธ๐ฌ SGD โข ๐ญ๐ฐ HKD โข ๐ณ๐ด NOK โข ๐ธ๐ช SEK โข ๐ฉ๐ฐ DKK โข ๐ณ๐ฟ NZD โข ๐น๐ท TRY โข ๐ฆ๐ช AED โข ๐ธ๐ฆ SAR โข ๐น๐ญ THB โข ๐ฒ๐พ MYR โข ๐ฎ๐ฉ IDR โข ๐ต๐ญ PHP โข ๐ต๐ฑ PLN โข ๐จ๐ฟ CZK โข ๐ญ๐บ HUF โข ๐ฎ๐ฑ ILS โข ๐จ๐ฑ CLP โข ๐ฆ๐ท ARS โข ๐ช๐ฌ EGP
Update src\utils\api.js to change the API provider:
const API_BASE_URL = 'your-api-url-here';- โก Fast Initial Load - Optimized bundle size
- ๐ Efficient Re-renders - React hooks optimization
- ๐พ Smart Caching - Reduced API calls
- ๐ฑ Mobile Optimized - Touch-friendly interface
Solution: Hard refresh the page (Ctrl + Shift + R) after first load.
Solution: Cached rates are used. Wait 1 hour or the cache clears automatically.
Solution: Check internet connection. API requires active connection.
# Build optimized production bundle
npm run build
# Preview production build locally
npm run previewThe production build will be in the dist/ folder.
Contributions are welcome! Feel free to:
- ๐ Report bugs
- ๐ก Suggest new features
- ๐ง Submit pull requests
Built with โค๏ธ using React, TailwindCSS, and ExchangeRate-API
