This is a solution to the Tip calculator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Calculate the correct tip and total cost of the bill per person
- Solution URL: https://github.com/NDOY3M4N/tip-calculator-app
- Live Site URL: https://ndoy3m4n.github.io/tip-calculator-app/
- Semantic HTML5 markup
- Flexbox
- CSS Grid
- Mobile-first workflow
- Vue - JS library
- Vite - Build Tool
- Tailwind CSS - "THE" CSS Framework
I learned that in Vue, the v-model
directive is a shorthand for @input
& :value
<input v-model="someState" />
does the same thing as:
<input :value="someState" @input="someState = $event.target.value" />
When used on a component, v-model
instead does this:
<custom-input
:model-value="someState"
@update:model-value="someState = $event"
></custom-input>
- Animate the Tip Amount & Total Amount result
- Switch to typescript
- Add PWA
- Hide arrows from input number - This helped me for hiding the default styles (the arrows) in the input number field.
- Use ref on component - This is stackoverflow post helped me targeting the reset button. I needed this part to disable, blur or focus the button component.