Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฑ Currency Converter

Currency Converter React TailwindCSS Vite

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.


โœจ Features

Core Functionality

  • ๐ŸŒ 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

UI/UX Excellence

  • ๐ŸŒ™ 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

๐Ÿ–ผ๏ธ Screenshots

image cann't loading!

Light Mode

Beautiful gradient interface with clean design

Dark Mode

Eye-friendly dark theme for night-time use

Mobile Responsive

Optimized layout for all screen sizes


๐Ÿš€ Installation

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Setup

  1. Clone the repository

    git clone <your-repo-url>
    cd currencyConvertor
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open in browser

    Navigate to http://localhost:5173
    

๐Ÿ“– Usage

Basic Conversion

  1. Enter Amount - Type the amount you want to convert
  2. Select Source Currency - Choose the currency you're converting from (e.g., USD)
  3. Select Target Currency - Choose the currency you're converting to (e.g., EUR)
  4. Click Convert - Get instant conversion results
  5. View Results - See converted amount with exchange rate

Additional Features

  • 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

๐Ÿ› ๏ธ Tech Stack

Frontend Framework

  • React 19.1.1 - Modern UI library with hooks
  • Vite 7.1.5 - Lightning-fast build tool and dev server

Styling

  • TailwindCSS 4.1.13 - Utility-first CSS framework
  • Custom CSS - Keyframe animations and transitions

API & Data

  • ExchangeRate-API - Real-time currency exchange rates
  • Axios - HTTP client for API requests

Icons & UI

  • Lucide React - Beautiful, consistent icon set

Development

  • ESLint - Code quality and consistency
  • Hot Module Replacement (HMR) - Instant updates during development

๐Ÿ“ Project Structure

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

๐ŸŒ Supported Currencies

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


Modify API Endpoint

Update src\utils\api.js to change the API provider:

const API_BASE_URL = 'your-api-url-here';

๐Ÿ“Š Performance

  • โšก Fast Initial Load - Optimized bundle size
  • ๐Ÿ”„ Efficient Re-renders - React hooks optimization
  • ๐Ÿ’พ Smart Caching - Reduced API calls
  • ๐Ÿ“ฑ Mobile Optimized - Touch-friendly interface

๐Ÿ› Known Issues & Solutions

Issue: Dark mode not working?

Solution: Hard refresh the page (Ctrl + Shift + R) after first load.

Issue: API rate limit reached?

Solution: Cached rates are used. Wait 1 hour or the cache clears automatically.

Issue: Conversion not working?

Solution: Check internet connection. API requires active connection.


๐Ÿš€ Build for Production

# Build optimized production bundle
npm run build

# Preview production build locally
npm run preview

The production build will be in the dist/ folder.


๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿ”ง Submit pull requests

๐Ÿ‘จโ€๐Ÿ’ป Developer

Built with โค๏ธ using React, TailwindCSS, and ExchangeRate-API


โญ Star this repo if you found it helpful!

Made with ๐Ÿ’ฑ and โ˜•

About

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.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages