Submitted about 1 year ago
Pricing component with toggle using vanilla JS
@WesselKonstantinov
Design comparison
SolutionDesign
Solution retrospective
I based my solution for the toggle switch on Scott O'hara's implementation, which involves the use of pseudo-elements to create the switch UI.
This is also my first time working with clamp()
in order to set a fluid font size on the price. I decided to include this, because I noticed the original font size of 72px seemed a bit too large at a viewport of 320px.
Any suggestions for improvement are welcome.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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