Logo
Logo

Element Settings

The Settings tab in Element Studio provides comprehensive configuration options for custom elements, allowing you to define their behavior, appearance, and integration within the Breakdance builder.

Overview

The Settings tab contains all the metadata and configuration options for your custom element, including:Basic Information: Name, slug, class name, and category

  • Badge Configuration: Visual indicators for the element in the builder
  • HTML Tag Options: Default tag and available alternatives
  • UI Configuration: Icon, order, and display settings
  • Nesting Rules: Element placement and relationship restrictions
  • Advanced Settings: Plugin dependencies, experimental features, and more

Basic Settings

Element Name

static function name()
{
    return 'My Custom Button';
}

The display name of your element in the builder interface.

  • Must be unique within your namespace
  • Cannot contain special characters
  • Should be descriptive and user-friendly

Slug

static function slug()
{
    return __CLASS__;
}

The unique identifier for your element, automatically generated from the name.

  • Auto-generated from the element name
  • Can be manually updated when the name changes
  • Used for PHP class names and file organization

⚠️ Important: Changing the slug will break all existing instances of this element on your site. The element will no longer be recognized by Breakdance, and you’ll need to replace all instances with the new element or restore the original slug.

Class Name

static function className()
{
    return 'bde-my-custom-button';
}

The CSS class name for your element.

  • Changing the class name makes the previous class obsolete
  • You’ll need to update any existing CSS that references the old class

Category

static function category()
{
    return 'Basic'; // Available categories: Basic, Layout, Content, Media, Forms, etc.
}

The category where your element appears in the builder.

Badge Settings

static function badge()
{
    return [
        'backgroundColor' => '#000000', // Background color
        'textColor' => '#ffffff',        // Text color
        'label' => 'Pro'                       // Badge text
    ];
}

Badges provide visual indicators for your element in the builder interface, helping users identify special or important elements.

  • Badge Background Color: Select a background color for the badge. There is a predefined list of colors available.
  • Badge Text Color: Select a text color for the badge. There is a predefined list of colors available.
  • Badge Label: Add the label (text) for the badge. Set to false to not include a badge.

No Badge and Clearing Badges

static function badge()
{
return false;
}

To remove a badge, click the clear badge option, which will return false:

HTML Tag Settings

Default Tag

static function tag()
{
    return 'div';
}

The primary HTML tag for your element.

Tag Options

static function tagOptions()
{
    return ['div', 'section', 'article', 'aside'];
}

A list of alternative tags users can choose from in the builder.

Dynamic Tag Control

static function tagControlPath()
{
    return 'content.settings.html_tag';
}

Path to a control that determines the tag dynamically.

Note: When using a dynamic control, the Settings > Html > Tag control is automatically disabled.

UI Icon Settings

UI Icon

static function uiIcon()
{
    return 'SquareIcon'; // Using built-in icon
    // OR
    return '<svg>...</svg>'; // Using custom SVG
}

The icon displayed for your element in the builder interface. There are many built-in Icons available. You can also use a custom SVG Icon by toggling the Local control to “Off” and pasting the SVG Icon’s code.

UI Order

static function order()
{
    return 50; // Lower numbers appear first
}

The numerical order for displaying elements in the builder.

Nesting Rules Settings

Nesting rules define how your element can be placed within the page structure.

Direct Child Restrictions

static function nestingRule()
{
    return [
        'type' => 'normal',
        'restrictedToBeADirectChildOf' => [
            'EssentialElements\\Container',
            'EssentialElements\\Section'
        ]
    ];
}

Elements that must be direct parents of your element.

Descendant Restrictions

static function nestingRule()
{
    return [
        'type' => 'normal',
        'restrictedToBeADescendantOf' => [
            'EssentialElements\\Container',
            'EssentialElements\\Grid'
        ]
    ];
}

Elements that your element can be placed inside.

Exclusion Rules

static function nestingRule()
{
    return [
        'type' => 'normal',
        'notAllowedWhenNodeTypeIsPresentInTree' => [
            'EssentialElements\\AnotherElement'
        ]
    ];
}

Elements that prevent your element from being used.

Inline Editable

static function nestingRule()
{
    return [
        'type' => 'normal',
        'inlineEditable' => true,
        'inlineEditableBlockPath' => 'content.settings.global_block'
    ];
}

Enable inline editing for Global Blocks.

  • Inline Editable: Select whether or not the element allows for Global Blocks to be edited inline.
  • Inline Editable Block Path: Select the Control(s) that contain the Global Block(s) you want to allow for inline editing.

Misc Option Settings

Element Type

static function nestingRule()
{
    return [
        'type' => 'normal' // normal, container-restricted, complex, final
    ];
}

The type of nesting rule for your element. The default is final, and we recommend leaving it at this unless you are creating a more complex element.

Required Plugins

static function settings()
{
    return [
        'requiredPlugins' => ['woocommerce']
    ];
}

Plugins that must be active for your element to work.

Pro Only

static function settings()
{
    return [
        'proOnly' => true
    ];
}

Mark your element as available only in Pro versions.

Global Scripts Dependency

static function settings()
{
    return [
        'dependsOnGlobalScripts' => true
    ];
}

Indicate that your element depends on global scripts.

Experimental Element

static function experimental()
{
    return true;
}

Mark your element as experimental. These elements are only available to users who enable expiremental elements via Preferences.

Bypass Pointer Events

static function settings()
{
    return [
        'bypassPointerEvents' => true
    ];
}

Use when clicking the element should activate something inside it.

Disable AI

static function settings()
{
    return [
        'disableAI' => true
    ];
}

Disable Breakdance AI features for your element.

Share Props with SSR Children

static function settings()
{
    return [
        'sharePropsWithSSRChildren' => true
    ];
}

Share properties from this element with child elements via Server-Side Rendering.

Disable Wrapper HTML Tag

static function settings()
{
    return [
        'disableWrapperHtmlTag' => true
    ];
}

Remove the wrapper HTML tag (frontend-only).

Warning: This breaks JavaScript functionality that relies on the tag being present (e.g., .breakdance .bde-rich-text-432-117).

Builder Only

static function settings()
{
    return [
        'builderOnly' => true
    ];
}

Element visible only in the builder.

Add Panel Rules

Always Hide

static function addPanelRules()
{
    return [
        'alwaysHide' => true
    ];
}

Hide element from the Add Panel completely.

Allowed Post Types

static function addPanelRules()
{
    return [
        'allowedPostTypes' => ['breakdance_template']
    ];
}

Restrict element to specific post types.

Default Properties

static function defaultProperties()
{
    return [
        'content' => [
            'text' => 'Default text',
            'settings' => [
                'alignment' => 'center'
            ]
        ],
        'design' => [
            'typography' => [
                'font_size' => '16px'
            ]
        ]
    ];
}

Set default values for your element’s properties. This can be set manually, or by adding an element to a design, opening Element Studio, and clicking the Import button under Default Properties.

Available In

static function availableIn()
{
    return ['breakdance', 'oxygen'];
}

Specify which builder modes your element is available in.

Options:

  • breakdance – Breakdance builder
  • oxygen – Oxygen builder
Meet Breakdance: The Best Visual Builder for WordPress
faces
Join thousands of freelancers and agencies who are working better and faster using Breakdance