Animated counters are a fun and effective way to display statistics to your visiteurs. The animation is triggered by lazy loading to make the page navigation really interesting. You can place as many counters as you want inside this module.
How to add a bar counter module to your page
Before you can add a bar counter module to your page, you will first need to access the Divi Builder. Once the Divi theme installed on your website, you will notice a button Use Divi Builder above the publisher each time you create a new page.
By clicking on this button, you can activate Divi Builder, which will give you access to all the Divi Builder modules. Then click on the button Use Visual Builder to start the generator in visual mode.
You can also click on the button Use Visual Builder when you are browsing your website on the frontend, if you are connected to your WordPress dashboard.
Once entered into Visual Builder, you can click the gray plus button to add a new module to your page. New modules can only be added inside rows. If you're starting a new page, don't forget to add a row to your page first. .
Locate the bar counter module in the list of modules and click on it to add it to your page. The list of modules is searchable, which means you can also type in the word "Bar counter" and then click enter to automatically search and add the bar counter module!
Once the module is added, you will be greeted with the list of module options. These options are divided into three main groups: Contents , Design et Advanced .
Use case to display project goals in a case study
One of the best ways to use the Bar Counters module is to illustrate the statistics for the case studies. Simply tag each bar with a specific project function or purpose so the user knows what services are included in the project. In this example, I'm using the bar module to display three project goals.
As you can see, the top of the page includes the three objectives of the project using the “Bar Counter” module and the bottom of the page includes the results of the case study using the “Counter” module Number ”.
Let's start.
Use the visual builder to add a standard section with a full width (1 column) layout. Then add a bar counter module to the row.
Update the parameters of the bar counters as follows:
Content options
Percentage of use: ON
Background color: #dddddd
Bar background color: # e07a5e
Design options
Text color: Dark
Title font: default
Title Font Size: 20px
Title Text Color: # 405c60
Title Line Height: 2em
Percentage Font: Default
Percent Font Size: 16px
Percentage Text color: #ffffff
Percentage Line Height: 2.5em
Now go back to the Content tab and select + Add a new item to add the first bar counter to the module.
Update the individual module settings as follows:
Content tab
Title: My title
Percent: 80
Save settings
Add two additional bar counters to the module and give each a title and a percentage.
That's all !
Bar counter content options
In the Content tab, you will find all the content elements of the module, such as text, images and icons. All that controls what appears in your module will always be in this tab.
Percentages of use
By default, percentages are displayed in the color bar counter. This text can be turned off using this setting, allowing the visual bar graph to speak for itself.
Background color
This option allows you to adjust the background color of each bar counter. This setting applies to the negative space behind the color of the filled bar.
Bar background color
This option allows you to adjust the background color of the filled bar. This background color overlaps with the previous background color setting.
Administration Label
This will change the module label in the generator for easy identification. When using the WireFrame view in Visual Builder, these labels will appear in the module block of the Divi Builder interface.
Bar Counter Design Options
In the Design tab, you will find all the module styling options, such as fonts, colors, size and spacing. This tab allows you to modify the appearance of your module. Each Divi module has a long list of design settings that you can use to tweak just about anything.
Text color
You can choose here whether your text will be light or dark. If you are working with a dark background, your text should be light. If your background is light, your text should be black. You can further customize your text color using the additional text color options that follow.
title font
You can change the font of your text by selecting the desired font from the drop-down menu. Divi comes with dozens of awesome fonts powered by Google Fonts. By default, Divi uses the Open Sans font for all the text on your page. You can also customize the style of your text using bold, italic, capital and underline options.
Title font size
Here you can adjust the size of your title text. You can drag the interval slider to increase or decrease the size of your text or you can directly enter the desired text size value into the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Title text color
By default, all text colors in Divi appear in white or dark gray. If you want to change the text color of your title, choose the color you want from the color picker using this option.
Title Letter Spacing
Letter spacing affects the space between each letter. If you want to increase the space between each letter of your title text, use the interval slider to adjust the space or enter the desired spacing size in the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Height of the title line
Line height affects the space between each line of title text. If you want to increase the space between each line, use the interval slider to adjust the space or enter the desired space size in the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Percentage of text
You can change the font of your text by selecting the desired font from the drop-down menu. Divi comes with dozens of awesome fonts powered by Google Fonts. By default, Divi uses the Open Sans font for all the text on your page. You can also customize the style of your text using bold, italic, capital and underline options.
Percentage font size
Here you can adjust the size of your text as a percentage. You can drag the interval slider to increase or decrease the size of your text, or you can directly enter the desired text size value into the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Percent text color
By default, all text colors in Divi appear in white or dark gray. If you want to change the color of your text as a percentage, choose the color you want from the color picker using this option.
Percent letter spacing
Letter spacing affects the space between each letter. If you want to increase the space between each letter of your text as a percentage, use the interval slider to adjust the space or enter the desired spacing size in the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Height of the percentage line
Line height affects the space between each line of your text as a percentage. If you want to increase the space between each line, use the interval slider to adjust the space or enter the desired space size in the input field to the right of the slider. The input fields support different units of measure, which means you can enter "px" or "em" depending on your size to change its unit type.
Border radius
Applying a border radius will round the corners of the bar in the bar counter. The greater the radius of the border, the more rounded the corners.
Use the border
Enabling this option will place a border around your module. This border can be customized using the following conditional parameters.
Color of the border
This option affects the color of your border. Select a custom color from the color picker to apply it to your border.
Width of the border
By default, the borders are 1 pixel wide. You can increase this value by dragging the range slider or entering a custom value in the input field to the right of the slider. Supported custom units of measure, which means you can change the default unit from "px" to something else eg em, vh, vw etc.
Border style
Borders support eight different styles, including: solid, dotted, dotted, double, groove, ridge, inset, and start. Select the style you want from the drop-down menu to apply it to your border.
Padding of bar
Padding is the space added inside your module, between the edge of the module and its internal elements. Here you can add custom top padding and bottom padding to the bar module.
Advanced Bar Counter Options
On the Advanced tab, you'll find options that more experienced web designers may find useful, such as custom CSS and HTML attributes. Here you can apply custom CSS to any of the module's many elements. You can also apply custom CSS classes and IDs to the module, which can be used to customize the module in your child theme's style.css file.
CSS ID
Enter an optional CSS ID to use for this module. An ID can be used to create a custom CSS style or to link to particular sections of your page.
CSS class
Enter the optional CSS classes to use for this module. A CSS class can be used to create custom CSS styling. You can add multiple classes, separated by a space. These classes can be used in your Divi child theme or in the custom CSS that you add to your page or to your website using the Divi theme options or the Divi Builder page settings.
Custom CSS
Custom CSS can also be applied to the module and any of the module's internal elements. In the Custom CSS section, you will find a text field where you can add CSS directly to each element. The CSS entries in these settings are already embedded with style tags. So you just have to enter CSS rules separated by semicolons.
Visibility
This option allows you to control the devices on which your module appears. You can choose to deactivate your module on tablets, smartphones or desktops individually. This is useful if you want to use different modules on different devices or if you want to simplify the mobile design by eliminating certain elements from the page.
That's it for this tutorial.