Challenge: Progress Button

Front-End Challenges Club - Challenge #004


We’re starting the new year with a beauty of a challenge. It might look straightforward from the outset, but as usual with a Front-End Challenges Club challenge, as we dig into the details, there’s a lot to consider.

The brief permalink

Take the design assets and re-create this progress button with whatever front-end technology you want. Consider how state is managed and how the button works when there is no JavaScript available. If you do the legwork upfront, you’ll make the whole process a lot easier with this one.

Make sure that your challenge solution does the following as a minimum:

  • Uses semantic elements
  • Is usable with mouse, touch and keyboard
  • Presents an acceptable focus state (pro-tip: this should be additional to the hover state)
  • Uses aria roles effectively to announce state changes

Bonus points awarded if:

  • You create a solid state management system
  • Your solution is lightweight and performant
  • Your solution is fully accessible
  • You create appropriate transitions and/or animations between states

Assets permalink

I’ve used Figma to design this challenge and you can run it with a completely free account!

Here’s some assets to get you going:

Here are some CSS Custom Properties for your colours:

Code language
CSS
:root {
  --color-primary: #21223e;
  --color-primary-light: #3c3f73;
  --color-success: #0c8d87;
  --color-error: #c01332;
  --color-light: #ffffff;
}

Wrapping up permalink

When you’ve tried building this one for yourself, head over to the solution to see how I built it!

See you at the next one 👋


Comments

If you liked this post, you might like these ones, too

  1. Solution: Progress Button

    Front-End Challenges Club - Solution #004

    Continue
  2. Challenge: Toggle switch

    Front-End Challenges Club - Challenge #002

    Continue
  3. Solution: Auto-scrolling, responsive grid

    Front-End Challenges Club - Solution #006

    Continue

Become a supporter by joining the Piccalilli Membership

For $5 per month, you get access to a private, friendly Discord community, a regular newsletter, huge discounts on courses and free access to all premium tutorials.

Most importantly, by becoming a supporter, you help make as much content, free-to-everyone as possible on this site, which benefits everyone. As a member, you also get an ad-free experience around the site.

Support Piccalilli by becoming a member

Sign up for updates

Stay up to date with updates from Piccalilli. You’ll get alerted as soon as any new content gets published. You’ll also get updates on upcoming courses and membership features! You can unsubscribe at any time, too.