Add Animation Param to the Element

⌘K
  1. Home
  2. Docs
  3. Developers “How To&...
  4. Add Animation Param to the Element

Add Animation Param to the Element

WPBakery Page Builder allows you to add an animation parameter type to your custom elements, enabling users to select an animation for the element from the predefined list of animations.

To add an animation parameter to the element, please use the vc_map_add_css_animation in the params array.

Here is an example:

[
   // Example alignment parameter
    [
       'type' => 'dropdown',
       'heading' => esc_html__( 'Alignment', 'js_composer' ),
       'param_name' => 'align',
       'value' => [
          esc_html__( 'Left', 'js_composer' ) => 'left',
          esc_html__( 'Center', 'js_composer' ) => 'center',
          esc_html__( 'Right', 'js_composer' ) => 'right',
       ],
       'description' => esc_html__( 'Select icon alignment.', 'js_composer' ),
    ],

    // This line will output the animation dropdown
    vc_map_add_css_animation(),
]

 

Was this article helpful to you? No Yes

How can we help?