DEV Community

SagarTrimukhe
SagarTrimukhe

Posted on

Progress bar to show content read/remaining.

I found this website where a progress bar is shown which helps users to know how much content they have read or is still remaining.

I tried to recreate that in react and it is easy and involves a bit of maths!

How to get the percentage?

Mathematical explanation

Simple maths :)

Code:

Demo:

Progress_bar_demo

Top comments (0)