- Introduction
- Key Features
- My Role in the Project
- Purpose and Objective
- Highlight
- Screenshots
- How to Run the Project Locally
- My Process
- Learnings
- Technologies Used
- Author
- Acknowledgments
This project is a tip calculator application that allows users to easily calculate the tip amount and total bill per person. The design and challenge were proposed by Frontend Mentor, aiming to create a responsive interface that adapts to different screen sizes.
- Automatic tip calculation based on predefined or custom percentages.
- Real-time data input with instant visual feedback.
- Input validation to ensure valid data.
- Responsive and accessible design.
In this project, I was responsible for the entire implementation, from frontend development to the JavaScript calculation logic.
The purpose of this project is to provide a practical tool to help users quickly and efficiently calculate tips. The app aims to simplify the process of splitting bills in group settings, such as dinners or shared meals.
The main feature of this project is the ability to automatically calculate the tip and total bill based on user inputs. The calculation logic is implemented in JavaScript, ensuring precise results and real-time updates as users interact with the input fields.
To run this project locally on your machine, follow these steps:
- Clone the Repository:
git clone https://github.com/alberto-rj/tip-calculator/
- Navigate to the Project Directory:
cd tip-calculator
-
Open the
index.html
file in your browser: You can either open the file directly in your browser or use a local server like Live Server if you're using Visual Studio Code. -
Interact with the app: The app is ready to use! Simply enter the desired values into the fields and calculate the tips.
To develop this application, I followed a structured process.
I understood the requirements of the challenge and created an initial interface sketch.
The project was structured using HTML, CSS, and JavaScript, with an emphasis on accessibility and usability best practices.
- Problem: The app must remain accessible during user input validation.
- Solution:
- Implementation of accessible validations.
- Clear and informative error messages.
- Tested on different devices to ensure an inclusive experience.
- Problem: Need to implement hover and focus states for all interactive elements on the page.
- Solution:
- Use of CSS pseudo-classes
:hover
and:focus-visible
. - Ensured consistent visual feedback on buttons and fields.
- Improved usability and accessibility of the app.
- Use of CSS pseudo-classes
- Problem: The layout must be optimized for different screen sizes.
- Solution:
- Implemented media queries to adjust the layout.
- Used relative units (such as
%
, andrem
) to ensure scalability. - Applied Flexbox and CSS Grid to create a flexible and adaptable layout.
- Tested on various devices to ensure proper viewing.
- Problem: The app must accurately calculate the tip and total cost per person.
- Solution:
- Implemented precise calculation functions in JavaScript.
- Ensured that results are displayed clearly and understandably.
-
Accessibility:
- I learned how to implement accessible validations and error messages, ensuring that all users can interact with the app, regardless of their abilities.
-
Visual Feedback:
- I understood the importance of hover and focus states to improve usability and accessibility, providing a better user experience.
-
Responsive Design:
- I developed CSS skills, using relative units, Flexbox, and CSS Grid to ensure the layout adapts to different screen sizes.
-
Testing:
- I realized the importance of testing the app on different devices and contexts to identify and correct usability issues.
-
Continuous Improvement:
- I learned that there is always room for improvement and that each challenge faced is an opportunity to learn.
- GitHub - @alberto-rj
- Frontend Mentor - @alberto-rj
- Twitter - @albertorauljose
Challenge provided by Frontend Mentor.