Search

6. While hover

6. While hover

Add one line of code to create a whileHover animation between two states.

⚡️ Some Examples – 06 – While hover

open in CodeSandbox

export function Example() {
    return (
        <motion.div
            style={{
                width: 150,
                height: 150,
                borderRadius: 30,
                backgroundColor: "#fff"
            }}
            whileHover={{ scale: 0.8 }}
        />
    );
}

Leave a Reply

plugins premium WordPress
Scroll to Top