Frontend Mentor - Interactive pricing component solution
This is a solution to the Interactive pricing component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Table of contents
Overview
The challenge
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
- Use the slider and toggle to see prices for different page view numbers
Page view and pricing totals
Here are the different page view ranges and the corresponding monthly price totals:
- 10K pageviews / $8 per month
- 50K pageviews / $12 per month
- 100K pageviews / $16 per month
- 500k pageviews / $24 per month
- 1M pageviews / $36 per month
If the visitor switches the toggle to yearly billing, a 25% discount should be applied to all prices.
Screenshot
Links
- Solution URL: https://www.frontendmentor.io/solutions/interactive-pricing-component-LZbB9Un5H0
- Live Site URL: https://drougnov.github.io/interactive-pricing-component-main/
My process
Built with
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
What I learned
-
How to show different values using range input
-
How to customize range input's background according to it's thumb using linear-gradient
Useful resources
- w3schools - It helped me to learn how to create toggle switch with checkbox input
- css-tricks - This blog helped me to create custom range slider.
- stackoverflow - Of course.
- chatGPT - New stackoverflow.
Author
- Website - Rocky Barua
- Frontend Mentor - @Drougnov
- Twitter - @itz_rocky_barua
- LinkedIn - Rocky (Biplob) BARUA