Elemelon
Elemelon
KPCKevin Powell - Community
Created by Elemelon on 12/19/2023 in #front-end
Implementing an animated progress bar for tracking article read progress.
No description
5 replies
KPCKevin Powell - Community
Created by Elemelon on 12/19/2023 in #front-end
Implementing an animated progress bar for tracking article read progress.
figured it out! thanks I was already using scroll timeline, i was having trouble taking the value of scroll timeline in any given keyframe and using it to calculate progress in terms of number of blocks to highlight. I ended up using a css variable inside @keyframe, and on every scroll reset a state variable based on number of the css variable that I grabbed with getcomputed style. it doesn't seem like a good idea to rerended a list of elements on every scroll event but it seems there is no better way to achieve what I'm trying to achieve
5 replies