Search the Community
Showing results for tags 'hover effect'.
-
Hey there! First of all, I'm quite new to GSAP in combination with React. For the current project I'm using NextJs. And what I want to achieve is, when hovering over a link, a line animates. Right now, I'm using modular styles for the styling. That's the structure. What I want to achieve is, that when the user is hovering over the linkWrapper class, the linkLine animates from a width of 0% to a width of 100%. Unfortunately I don't know how to achieve this with NextJS & GSAP. <div className={styles.linkWrapper} onMouseEnter={onEnter} onMouseLeave={onLeave}> <Link href="#">V.1.1 / Y2023</Link> <div className={styles.linkLine}></div> </div>
- 1 reply
-
- animation
- hover effect
-
(and 1 more)
Tagged with:
-
Hi there, I am a newbie web-developer student. Recently I have started exploring the powers of GSAP !! I would really appreciate if somebody could let me know how I can make this as a Mouse Hover effect? I have searched literally everywhere, but didn't get what I was looking for. Thanks in advance!!
-
Hello Guys, I want to know to get this effect. Many websites have these. When we hover on a piece of text, images pop-up and when we move away from text, they disapper. Well, the major drawback for me is that I don't know the javascript at all! But I'm great at html&css. I just want a simple effect, image pop-up and move along as we move the cursor on text. I'm sharing the websites which have these effects. I'm including a codepen which has this effect but the problem is, when implement that javascript into my website, it has a part, this on const image = document.querySelector('img') This select all the img tag and I don't even why it has an empty img tag in the beginnning of html. It would be great, if you can help me in any way. https://www.craig-reynolds.com/ https://normal.studio/en/ Thanks & Have a great day!
- 5 replies
-
- image transition
- effect
-
(and 4 more)
Tagged with:
-
Hi. I need some basic help with gsap.timeline() in a react environment. See my code below: import React, { useRef, useEffect } from 'react' import gsap, { TweenMax, Linear } from 'gsap'; import { ReactComponent as Twitter } from '../assets/svg/social/twitter.svg' const NavBar = () => { let twitterIcon = useRef(null); const tl = gsap.timeline() // this is the hover effect, making it glow green (all attributes are correct) const glowAnimation = (icon) => { tl.to(icon, 0.3, {attr: {style: "fill: rgb(48,223,171)"}, ease: Linear}) } // This just sets the initial colour of the black svg to white useEffect(() => { TweenMax.set(twitterIcon, {attr: {"style": "fill: rgb(255,255,255)"}}) }) return ( <div className="navbar"> <a title="Twitter" target="_blank" rel="noopener noreferrer" // onMouseEnter={ glowAnimation({twitterIcon}) } // onMouseLeave={ something? reverse of tl } href="redacted"> <Twitter // This is an SVG imported as ReactComponent className="navbar__icon" title="Twitter" ref={el => {twitterIcon = el}} /> </a> </div> ) } export default NavBar The basic premise of this is that it is part of my header. It has only one twitter icon (svg) right now. I want to be able to add more icons in the future (e.g. facebook, github) hence why I want to be able to pass in some reference to an icon into a single gsap timeline to describe the hover animation (defined as glowAnimation function) when mouse over an icon, and reverse that timeline when mouse leaves that icon. So I created a function with that timeline. But I'm unsure how to pass the twitterIcon reference (made using useRef) into the onMouseEnter attribute. What am I doing wrong? And also, what can I put in the onMouseLeave attribute to reverse the glowAnimation function? Sorry if this is stupid
-
I was trying to create a simple button hover effect using the jQuery(this) on the button. When you swipe your mouse over the button real fast the hover out animation triggers and does not allow the hover in animation to finish. This causes the button to get smaller and smaller and causes the text to stack up. I've seen solutions for this problem but none of them allow me to use jQuery(this) in the timeline. Any help would be much appreciated. ?
-
Hi everyone! I am trying to make simple hover 3d tilt effect with GSAP. All seems fine, but one buggy thing - on initial page load, when you first hover on card, there's super fast transformation happens, and I don't understand why this is happening? How to fix it? I tryed to put CSS `transition` on whole card, and this "glitch" is now animating. But what cause it in first place? Here I made repro (duration is super slow, so you can see this initial jerking): https://codepen.io/bdrtsky/pen/wNxpVW
- 5 replies
-
- parallax hover
- hover effect
-
(and 2 more)
Tagged with:
-
Hello everyone, I hope this topic finds you all well. I would like know if it is possible to change the colour of one of the buttons on mouseenter(while is paused). The two buttons are in sync and I have noticed that on mouse leave the button I was hover snaps to sync with the other button. Is there any chance I could make that transition smoother? I hope this is clear. You can check the project on my codepen link http://codepen.io/al...ar77/pen/gMaRNm Thanks in advance. Alex
-
Hello everyone, I hope this topic finds you all well. I would like know if it is possible to change the colour of one of the buttons on mouseenter(while is paused). The two buttons are in sync and I have noticed that on mouse leave the button I was hover snaps to sync with the other button. Is there any chance I could make that transition smoother? I hope this is clear. You can check the project on my codepen link http://codepen.io/aleguitar77/pen/gMaRNm Thanks in advance. Alex