Utilize a hover interaction to display elements upon hovering.
Within this tutorial:
- Create an animation for hover entry
- Create an animation for hover exit
- Implement the animation on other components
Establish an animation for hover entry
- Choose your Link Block (to serve as the trigger)
- In the Interactions panel, click the addition symbol beside Element Trigger and opt for Mouse Hover from the selection
- For the On Hover event, select Initiate an Animation from the Action list
- Tap the addition symbol near Time Animations
- Name it (e.g., Slide in)
- Pick the component you wish to animate (e.g., the Heart component)
- Hit the addition symbol near Timed Actions and choose Shift from the options
- For the Shift, assign a value to the x-axis (e.g., -100)
- Beside Timing, switch on the toggle for Set as initial state
- Repeat steps 6 to 9 for other elements to be animated
- Interactions panel, (press shift) and pick the component(s) in the sequence
- Right-click to replicate
- For the Shift, revert the x-axis to its original value (0 pixels)
- For Timing, change the Easing (e.g., to Ease Out)
- Decrease the Duration (e.g., to 0.2 seconds)
Create an animation for hover exit
- Exit the animation you just created
- In the Interactions panel under On Hover Out, opt for Initiate an Animation from the Action list
- In Timed Animations, tap the gear icon beside Slide in and choose Replicate
- Activate Slide in 2
- Rename it (e.g., Slide out gracefully)
- Erase the replicated animations (e.g., Heart and H3 Price) from the sequence
- Choose the remaining animations in the timeline
- Beside Timing, turn off Set as initial state
- Adjust Easing and Duration as previously done
Implement the animation on other components
- Select any of the Timed Actions in the sequence
- Beside Impact choose Class
- Click All elements with this class and select Only children with this class
- Repeat 1-3 for both hover entry and hover exit
Latest posts by Ewan Mak (see all)
- Include or eliminate Workspace spots and members - April 15, 2024
- Centering box summary - April 15, 2024
- Store a site for future reference - April 15, 2024