This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ryan Greenhalgh
Posted Dec 12 - Read on Facebook

Hi everyone, I have a slider component and an array of tick marks. The goal is make the tick marks active/inactive based on the position of the slider. I can get the ticks to become active, but when I try to change their state back to "inactive" it makes all of the ticks "inactive." Any help would be very very appreciated.


Floris Verloop

Hi Ryan! You can achieve that with a few lines of code. There's no need to manually check which ticks should be active, we have computers to do our dirty work 😉. On every value change event, we can simply calculate the number of ticks that should be active. All we need to do that is the current slider value (ranging from 0 to 1) and the total amount of ticks.

I've simplified your project and added comments to all important steps. I hope you can follow, if not just let me know. Check it out here:

Read the entire post on Facebook