How to Add Tooltips to Your Webflow Website: A Step-by-Step Guide

Published on
October 18, 2021

How to Easily Add Tooltips to Your Webflow Website

Tooltips are a great way to hide additional information that gets shown on hover when a customer doesn't need to see that information right away. They are commonly used on pricing pages to explain features or provide additional details about certain elements. In this tutorial, we will explore how to easily add tooltips to your Webflow website without using animations or interactions. We'll simply add some custom code, include the content to the tooltip, and then republish our site to see the changes.

Adding Tooltips to Your Webflow Website

Let's start by adding tooltips to a pricing page in Webflow.

Step 1: Adding the Tooltip

  1. Scroll down to the section where you want to add the tooltip, click on the text span, and add the class of "tooltip".
  2. To make it appear as hoverable, add some styling by scrolling down to the borders, adding a bottom border, making it dashed, and selecting a suitable color.

Step 2: Custom Attribute

  1. After styling the tooltip, go into the settings of the text element and add a custom attribute to make the tooltip work.
  2. Add an attribute with the name "data-tippy-content" and set the value to the actual text content inside the tooltip. This can include standard text as well as links.

Step 3: Adding Custom Code

  1. Find custom code for the project in the project settings or use the Webflow's custom code section in the site settings.
  2. Add the custom CSS code to the head section and the JavaScript code to the in-body tag.

Step 4: Publishing and Testing

  1. As the custom code will only show up on the published site, publish the site after adding the custom code.
  2. Once published, refresh the page to see the tooltip in action.

Customizing Your Tooltip

Since we are using tippy.js, there are various ways to further style the tooltip element.

  1. Change the style, placement, arrow type, animation, duration, and theme of the tooltip by referring to the tippy.js documentation.

Example of Customization:

  1. Change the theme to "material" and adjust the arrow type to "small".
  2. Modify the maximum width, animation to "scale", and the duration for the tooltip to appear.
  3. Save the changes and publish the site again to see the updated tooltip in action.

By experimenting with the styling options in the tippy.js documentation, you can create a completely different tooltip to suit your website's design and aesthetic.

Conclusion

Adding tooltips to your Webflow website is a quick and simple way to enhance user experience and provide additional information where needed. By following the steps outlined in this tutorial, you can easily incorporate tooltips into your website without the need for complex animations or interactions.

Feel free to experiment with different customization options and themes to make the tooltips perfectly align with your website's design and functionality.

We hope you found this tutorial helpful. If you have any feedback or suggestions for future videos, please feel free to share them in the comments. Happy tool-tipping and see you in the next tutorial!