Skip to content

RKcode-ai/Unit-Convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ Metric/Imperial Unit Converter

A simple and responsive web app to convert between metric and imperial units.
Built using HTML, CSS, and JavaScript.


✨ Features

  • Convert between:
    • Length β†’ meters ↔ feet
    • Volume β†’ liters ↔ gallons
    • Mass β†’ kilograms ↔ pounds
  • Responsive layout that adapts to desktop, tablet, and mobile.
  • Real-time conversion on button click.
  • Clean, minimal UI with distinct sections for each type of conversion.

πŸš€ Demo

  1. Enter a number into the input field.
  2. Click the Convert button.
  3. See the results instantly in all three categories: Length, Volume, and Mass.

πŸ› οΈ Tech Stack

  • HTML β†’ Structure
  • CSS β†’ Styling + Responsive Design
  • JavaScript β†’ Conversion logic

πŸ“‚ Project Structure

β”œβ”€β”€ index.html # Main app structure β”œβ”€β”€ index.css # Styling and responsiveness β”œβ”€β”€ index.js # Conversion logic


βš™οΈ Conversions Used

  • 1 meter = 3.281 feet
  • 1 liter = 0.264 gallon
  • 1 kilogram = 2.204 pounds

πŸ“Έ Preview

Hero section for input + conversion button, followed by three result cards for:

  • Length (Meter/Feet)
  • Volume (Liters/Gallons)
  • Mass (Kilograms/Pounds)

πŸ“± Responsiveness

  • Desktop β†’ Centered layout with wide cards.
  • Tablet β†’ Scales down input/button size.
  • Mobile β†’ Full-width cards and smaller text for readability.

▢️ How to Run

  1. Clone this repo or download the files.
  2. Open index.html in your browser.
  3. Start converting units πŸŽ‰

πŸ“Œ Future Improvements

  • Add temperature conversions (Β°C ↔ Β°F ↔ K).
  • Support live conversion as the user types.
  • Add a dark/light mode toggle.

πŸ‘¨β€πŸ’» Author

Built with ❀️ by Rayyan Khattak using HTML, CSS, and JavaScript.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published