const[xPos,setXPos]=useState(0)const[yPos,setYPos]=useState(0)const[borderRadiusValue, setBorderRadiusValue]=useState(0)const[rotateValue,setRotateValue]=useState(0)return(<divclassName="p-2 shadow-inner w-full py-24 shadow-white rounded-lg bg-black/90 "><motion.divanimate={{x:xPos, y:yPos, borderRadius: borderRadiusValue, rotate:rotateValue}}className="w-24 bg-white h-24 mx-auto shadow-md shadow-gray-900"></motion.div></div>)// use input:range to play with the values
const parent={
hidden:{opacity:0},
visible:{opacity:1,
transition:{//you can use these if u want stagger effect on initial stage instead of whileInView // delayChildren:2,// staggerChildren:.1}},}const child={
hidden:{opacity:0},pop:(custom)=>({
opacity:1,
transition:{
delay:.04*custom
}})}return(<Block><motion.divclassName='p-5 rounded-lg bg-white w-max grid grid-cols-2 lg:grid-cols-4 mx-auto'variants={parent}initial='hidden'animate='visible'whileInView={'pop'}>{[1,2,...,16].map((data,i)=><Childkey={i}custom={data}/>)}</motion.div></Block>)