Selecting class via Sass Modules Next.js in GSAP Posted April 17, 2023 Hello, I use GSAP with css modules and to avoid adding extra classes, i use css attribute selector like this : useLayoutEffect(() => { const ctx = gsap.context(() => { const sectionContent = gsap.utils.toArray('[class*="content"]')) }, sectionRef) return () => ctx.revert() }, []) So, the scoped class is enough : <div className={`${styles.content}`}> I hope this helps. 2
Selecting class via Sass Modules Next.js
in GSAP
Posted
Hello,
I use GSAP with css modules and to avoid adding extra classes, i use css attribute selector like this :
So, the scoped class is enough :
<div className={`${styles.content}`}>
I hope this helps.