Skip to content

HafizEngineerMuhammadAbdullah/MySimpleCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Glassmorphism Calculator

A modern animated calculator built using HTML, CSS & JavaScript โœจ


๐Ÿš€ Live Features

  • ๐Ÿงฎ Basic arithmetic operations (+, -, ร—, รท)
  • ๐Ÿ’ก Percentage support (% logic included)
  • ๐ŸŽจ Glassmorphism UI design
  • โšก Real-time input handling
  • โŒ Error handling (NaN, Infinity, etc.)
  • ๐Ÿ“ฑ Fully responsive mobile design

๐Ÿ› ๏ธ Tech Stack

  • HTML5
  • CSS3 (Glassmorphism + Animations)
  • JavaScript (DOM + Logic + eval replacement)

๐Ÿ“ธ Preview


๐ŸŽฌ Demo (GIF)


โš™๏ธ How It Works

  • Buttons update input field dynamically
  • Expression is built as string
  • % is converted to /100
  • Function() evaluates safely instead of eval()
  • Error handling resets invalid output

๐Ÿ“ฑ Responsive Design

โœ” Mobile-friendly layout
โœ” Touch-optimized buttons
โœ” Adaptive calculator size


๐Ÿ’ก What I Learned

  • DOM manipulation
  • Event handling
  • String-based expression building
  • UI/UX design principles
  • Glassmorphism styling

๐Ÿ“‚ Project Structure

calculator/ โ”‚โ”€โ”€ index.html โ”‚โ”€โ”€ style.css โ”‚โ”€โ”€ script.js โ”‚โ”€โ”€ assets/ โ”‚ โ”œโ”€โ”€ calculator.png โ”‚ โ”œโ”€โ”€ calculator.gif


๐Ÿ“ซ Connect With Me


โญ If you like this project, give it a star!