A modern web-based calculator that replicates the Basic Mode functionality of the Windows 11 Calculator app, built with Vue 3, Vite, and TailwindCSS.
- Standard Arithmetic Operations: Addition (+), Subtraction (-), Multiplication (×), Division (÷)
- Advanced Operations:
- Square (x²)
- Square Root (²√)
- Reciprocal (1/x)
- Percentage (%)
- Sign Toggle (±)
- MC: Memory Clear
- MR: Memory Recall
- M+: Memory Add
- M-: Memory Subtract
- MS: Memory Store
- Windows 11 Fluent Design: Authentic glassmorphism effects and styling
- Light/Dark Mode Toggle: Seamless theme switching with Windows 11 color schemes
- Responsive Design: Optimized for various screen sizes
- Error Handling: Proper handling of division by zero and invalid operations
- Clear Functions:
- C (Clear All)
- CE (Clear Entry)
- ⌫ (Backspace)
- Decimal Point Support
- Keyboard Support
- Vue 3 - Progressive JavaScript framework with Composition API
- Vite - Next-generation frontend tooling
- TailwindCSS v4 - Utility-first CSS framework
- PostCSS - CSS transformations
- Yarn - Package manager
- Node.js (v16 or higher)
- Yarn package manager
-
Clone the repository
git clone https://github.com/kyrie25/Web-Dev-Course-Calculator.git cd Web-Dev-Course-Calculator -
Install dependencies
yarn install
-
Start development server
yarn dev
-
Open browser Navigate to
http://localhost:5173/
# Build the project
yarn build
# Preview production build
yarn preview- Click number buttons to input values
- Click operation buttons (+, -, ×, ÷) to perform calculations
- Click = to see the result
- Use C to clear all or CE to clear current entry
- Use ⌫ to delete the last digit
- Percentage: Enter a number and click %
- Square: Enter a number and click x²
- Square Root: Enter a number and click ²√
- Reciprocal: Enter a number and click 1/x
- Sign Toggle: Click ± to change number sign
- Store: Enter a number and click MS to store in memory
- Recall: Click MR to recall stored value
- Add: Enter a number and click M+ to add to memory
- Subtract: Enter a number and click M- to subtract from memory
- Clear: Click MC to clear memory
Click the 🌙/☀️ button in the top right to switch between light and dark modes.
src/
├── components/
│ ├── Calculator.vue # Main calculator logic and state
│ ├── Display.vue # Calculator display component
│ └── Keypad.vue # Button layout and input handling
├── App.vue # Root component
├── main.js # Application entry point
└── style.css # Global styles and theme definitions
- Calculator.vue: Manages all calculator state, operations, and business logic
- Display.vue: Renders current value and calculation history
- Keypad.vue: Handles button layout and user input events
- Pure CSS with TailwindCSS utilities for rapid development
- CSS custom properties for theme variables
- Glassmorphism effects using backdrop-filter and rgba colors
- Responsive design with CSS Grid and Flexbox
- Vue 3 Composition API with reactive refs
- Local component state for calculator operations
- Memory storage using JavaScript variables
- Theme state with localStorage persistence (planned)
- Chrome/Edge 88+
- Firefox 87+
- Safari 14+
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
- Design inspiration from Windows 11 Calculator
- Vue.js team for the excellent framework
- TailwindCSS team for the utility-first approach