You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or css variables on scroll. is that possible? how can i achieve it with some hack? e.g. get the progress of the parallax and then set it manually? any help appreciated
The text was updated successfully, but these errors were encountered:
Of course, not really a hack. Set a variable on progress like so:
functionExample(){constparallax=useParallax({onProgressChange: (progress)=>{if(parallax.ref.current){// set progress to CSS variableparallax.ref.current.style.setProperty("--progress",progress.toString());}},});return(<h1ref={parallax.ref}className="thing"// use the progress to change the width of the borderstyle={{WebkitTextStrokeWidth: `calc(20px * var(--progress))` }}>HELLO</h1>);}
I want to animate the textstroke of an element
or css variables on scroll. is that possible? how can i achieve it with some hack? e.g. get the progress of the parallax and then set it manually? any help appreciated
The text was updated successfully, but these errors were encountered: