How can I show an underline animation on a header when hovering over a link block in Webflow?

Published on
September 22, 2023

To create an underline animation on a header when hovering over a link block in Webflow, you can follow these steps:

  1. Select your header element: Identify the header element in which you want to create the underline animation. This could be a heading element (H1, H2, etc.) or a paragraph element.

  2. Convert the header element to a link block: Right-click on the header element and select "Link Block" from the "Wrap in" dropdown menu. This will convert your header element into a link block.

  3. Create a div for the underline: Inside the link block, create a new div element. This div will be used to create the underline effect.

  4. Style the underline div: Give the underline div a class name and apply the desired styling. This includes setting its width, height, position, and color to match the design of your underline animation.

  5. Set initial state and interaction: With the underline div selected, go to the Interactions panel. Add a new interaction by clicking the "+" button. Set the initial state by specifying the starting position of the underline div.

  6. Add hover trigger: In the Interactions panel, click the "+" button to add a new trigger. Select "Hover" from the dropdown menu and choose the "Over" option. This will activate the interaction when the link block is hovered over.

  7. Create the hover animation: Click on the "Start an animation" button in the Interactions panel to define the hover animation for the underline div. This could be a simple transformation, such as scaling the width or height of the div, or animating its position.

  8. Set interaction settings: Customize the animation duration, easing, and delay according to your preference. You can also set the interaction to repeat or loop for added effect.

  9. Preview and fine-tune: Use the Webflow Preview mode to see how the underline animation looks and feels. Adjust the animation properties as needed to achieve the desired effect.

  10. Publish and enjoy: Once you are satisfied with the underline animation, publish your Webflow project for the changes to take effect on your live site.

By following these steps, you can create an eye-catching underline animation on a header when hovering over a link block in Webflow.

Additional questions:

  1. How do I create a hover effect in Webflow?
  2. Can I apply different animations to different elements in Webflow?
  3. What other types of mouse-triggered animations can I create in Webflow?