Interactive Pricing Component

Solution retrospective
I'm proud that I completed the entire project from HTML and CSS to JavaScript, including the discount logic and slider functionality. It really helped me solidify how to connect user input to dynamic UI updates. Next time, I'd like to improve the visual feedback of the slider.
What challenges did you encounter, and how did you overcome them?One challenge was making sure the price updates correctly both when the slider moves and when the billing toggle is switched. At first, the price only updated on slider input. I fixed it by extracting the update logic into a separate function and calling it from both event listeners. Another tricky part was styling the slider itself, especially changing the fill color dynamically. That required a bit of research and some custom CSS with background gradients.
What specific areas of your project would you like help with?I’d love feedback on how I handled the JavaScript logic for the pricing plans. Are there cleaner or more scalable ways to structure the plan data and event handling? Also, if anyone has tips on making sliders more accessible or improving the slider UX visually, I’d really appreciate it.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Levin Kooss's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord