How to Speed up Animation Effect on Divi Search Icon

If you’re working with Divi, you must know the Divi search icon (πŸ”Ž). The Divi search icon itself isn’t a standalone element, you must turn on the option to display it on your website. It’s a part of the header elements on the Divi Theme Customizer and also part of the element of the Divi Builder’s Menu module.

The option to show the search icon in the Theme Customizer and Menu module

In this article, we’ll walk you through some simple steps on how to accelerate the animation effect on your Divi search icon using custom CSS. This method will cover both the Divi search icon in the Divi Theme Customizer and the Divi Builder’s Menu module.

Even if you’re new to CSS, don’t worry! We’ll break down the steps into easy-to-follow instructions. By the end of this guide, you’ll have a Divi search icon that animates with snappy precision, enhancing your website’s overall performance.

The default animation speed of the Divi search icon
Animation speeds up after custom CSS added

How to Speed Up Animation Effect on Divi Search Icon

1. Speed up the Search Icon Animation Effect in the Divi Theme Customizer

Enable the Search Icon option

As we mentioned earlier, the search icon isn’t a standalone element, and you need to enable the option first to display it on your website.

Navigate to the Divi Theme Customizer; there are two ways to access it as below:

  • WordPress dashboard -> Appearance -> Customize
  • WordPress dashboard -> Divi -> Theme Customizer

Next, open the Header & Navigation settings, then go to the Header Elements block where you will find the option to enable showing the search icon.

Once you’ve enabled the search icon and made any desired customizations, don’t forget to save and publish the changes using the Publish buttons in the top right corner of the Divi Theme Customizer.

Add the Custom CSS

Now it’s time to add the CSS code to your Theme Customizer.

Copy the CSS snippet below and paste it into the Additional CSS input field.

.et_pb_search_visible.et_pb_no_animation {
    opacity:unset!important;
}
.container.et_search_form_container.et_pb_search_visible {
	animation: fadeInTop 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
    opacity: 1;
}

.et_pb_search_form_hidden {
	animation: fadeOutTop 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
    opacity: 0;
}

.et_pb_menu_hidden #top-menu,
.et_pb_menu_hidden #et_search_icon:before,
.et_pb_menu_hidden .mobile_menu_bar {
	animation: fadeOutBottom 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
}

.et_pb_menu_visible #top-menu,
.et_pb_menu_visible #et_search_icon:before,
.et_pb_menu_visible .mobile_menu_bar {
	animation: fadeInBottom 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
}

Once you finish adding the CSS snippet, apply it by clicking the PUBLISH button.

Go to one of your website’s pages and give it a try to see the result.

2. Speed up the Search Icon Animation Effect in the Divi Builder’s Menu module

Enable the Search Icon option

First, please ensure that you’ve already turned on the search icon option.

On the Menu module settings, navigate to the Content tab -> Elements -> Show Search Icon.

Add the Custom CSS

Next, we’re going to add the CSS snippet to the Menu module. On the module settings, navigate to the Advanced tab -> Custom CSS.

Please copy the CSS snippet below and paste it into the CSS input field.

.et_pb_menu__search-container.et_pb_menu__search-container--visible {
animation: fadeInTop 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
opacity: 1;
}
.et_pb_menu__search-container.et_pb_menu__search-container--hidden {
animation: fadeOutTop 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1);
opacity: 0;
}

.et_pb_menu__wrap--hidden,
.et_pb_menu__wrap--hidden #et_search_icon:before,
.et_pb_menu__wrap--hidden .mobile_menu_bar {
animation: fadeOutBottom 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1) !important;
}
.et_pb_menu__wrap--visible,
.et_pb_menu__wrap--visible #et_search_icon:before,
.et_pb_menu__wrap--visible .mobile_menu_bar {
animation: fadeInBottom 0.2s 1 cubic-bezier(0.77, 0, 0.175, 1) !important;
}

Preview your page to see the result. Don’t forget to save your project and publish it if you want to.

What Do the Two CSS Snippets Do?

The two CSS snippets we provided above control the animation effects in Divi menus (Theme Customizer and Menu module).

It fades search icons and mobile menus in/out with a 0.2-second animation and a specific easing effect.

Replace the values in each CSS snippet if you want to change the animation effect speed of your Divi search icon.

The Bottom Line

By incorporating the provided custom CSS, you can significantly improve the animation speed of the search icon on your website. This targeted adjustment enhances the visual appeal of the interaction and contributes to a more responsive user experience.

We believe that visitors will appreciate the smoother and faster animation, which can subconsciously reinforce a sense of efficiency and polish throughout your website. This positive impact on user experience can increase engagement and a stronger overall impression of your brand.

This page may contain affiliate links, which help support our project.Β Read our affiliate disclosure.
Picture of Akbar Padma

Akbar Padma

Akbar is a WordPress expert and a writer staff at WPPagebuilders. He mainly writes about Gutenberg, Elementor, Divi, and other WordPress page builders.
Want to start a profitable blog with WordPress?Β OF COURSE!

Leave a Comment

Save your Divi assets to the cloud and access them from anywhere.
Hey πŸ‘‹πŸ»
Got WordPress knowledge?
Why not turning it into profit? Click the button below to learn how.

Your popup content goes here

50%

Where should we send the template?

After entering your email address, you will be added to our newsletter subscribers. You can unsubscribe anytime.

Want to Build Passive Income Like the One on the Screenshot Below?

Click the button on the right side to learn how πŸ‘‰πŸ»
5 easy steps to turn your WordPress knowledge into monthly recurring revenue.

Click the above button to close the popup.