Slider that translates content in and out of container based on slider x-axis position
I’m working on a slider that has 4 stages of content. I am trying to translate the content in and out of the container based on the slider’s position on the x-axis. I need the content to move with the slider, not transition or animate automatically. I have been working on this for days and I cannot figure it out. I’m working with svelte, typescript, and tailwind css, which I’m relatively new to svelte and typescript. I’m not sure if this would be easier to achieve with GSAP? (which I have a little bit of experience with) Here is my current code: