Master Addons
  • Widgets
    • Changelogs
      Source Code NEW PRO
      Caldera Forms
      Logo Slider
      Table of Contents
      Gravity Forms
      Transforms PRO
      Restrict Content PRO
      Pricing Table
      Ninja Form
      Mailchimp
      Tooltip
      Popup Trigger NEW PRO
      Which Element NEW
      Creative Button
      Creative Links NEW
      Domain Search HOT PRO
      Dual Heading HOT
      Flipbox
      Animated Gradient BG HOT PRO
      Image Hotspot PRO
      Infobox
      News Ticker PRO
      Particles
      Progress Bar
      Off-Canvas Content NEW PRO
      Reading Progress Bar HOT
      Custom JS
      Blockquote
      Counter Up
      Image Hover Effects
      Reveal NEW PRO
      Rellax PRO
      Positioning
      Image Comparison
      Tabs
      Toggle Content HOT PRO
      Post/Page Duplicator FREE
      Icons Extended
      Floating Effects PRO
      Mega Menu HOT
      Custom CSS HOT
      Gradient Headline
      Advanced Image
      Nav Menu
      Tooltips
      Comparison Table PRO
      Glassmorphism
      Featured Product PRO
      Image Carouse
      Gallery Slider NEW PRO
      Dynamic Tags NEW
      Countdown Timer
      Current Time
      Patterns
      Wrapper Link
      Timeline
      Team Member
      Contact Form 7
      Advanced Accordion
      Animated Headlines
      Blog
      Business Hours
      Call To Action
      Progress Bars
      Background Slider
      Team Slider
      Dynamic Table
      Grid Line PRO
      WP Forms
      Search
      We Form
      Entrance Animation NEW PRO
      Display Conditions PRO
      Filterable Image Gallery
      WP Forms
      Custom Breakpoints NEW
  • Features
    • Theme Builder

      Design site-wide templates for a consistent look across every page of your website.

      Popup Builder

      Create engaging popups, modals, and announcement bars - to capture leads.

      Widget Builder

      Expand Elementor with advanced custom widgets to build more dynamic layouts.

      Mega Menu Builder

      Create multi-column menus with icons and images for superior navigation.

      Custom Css

      Apply your own CSS for pixel-perfect styling beyond default design options.

      Dynamic Tags

      Insert dynamic content like post titles and custom fields directly into designs.

      Display Conditions

      Control element visibility based on user role, device, time, and other rules.

      Icons Library

      Choose from thousands of built-in icons to enhance visuals and consistency.

      Animation

      Add scroll, hover, entrance, and much more animations to bring designs to life.
  • Template Kits
    • Template Kits

      Professionally designed full-page template Kit. Import and customize in seconds.

      Ready Sections

      Pre-built content sections and rows. Drag, drop, and customize instantly.

      Ready Popups

      Different types of High-converting popup designs. Import and launch quickly.

      Ready Pages

      Complete page layouts for any purpose. Start editing immediately.

      Ready Header

      Multiple modern header designs. Import and adapt to your brand.

      Ready Footer

      Fully designed footers for different websites. Add functionality and style in clicks.
  • Brands
    • WP Adminify

      Take control of your WordPress dashboard. Customize the admin experience.

      Admin Bar Editor

      Customize the WordPress admin bar for a cleaner, more personalized workspace.

      Loginfy

      Customize your WordPress login page with branding, styles, and security enhancements.

      Rolemaster Suite

      Manage user roles and permissions with precision for better security and workflow.

      Master Blocks

      Expand the Gutenberg editor with advanced custom blocks for more creative layouts.

      WP Spotlight

      Instantly search and access admin features, posts, and settings from anywhere.
  • Themes
  • Help
    • Get Support
    • Documentation
    • Facebook Community
    • Changelogs
  • Blog
  • Widgets
    • Changelogs
      Source Code NEW PRO
      Caldera Forms
      Logo Slider
      Table of Contents
      Gravity Forms
      Transforms PRO
      Restrict Content PRO
      Pricing Table
      Ninja Form
      Mailchimp
      Tooltip
      Popup Trigger NEW PRO
      Which Element NEW
      Creative Button
      Creative Links NEW
      Domain Search HOT PRO
      Dual Heading HOT
      Flipbox
      Animated Gradient BG HOT PRO
      Image Hotspot PRO
      Infobox
      News Ticker PRO
      Particles
      Progress Bar
      Off-Canvas Content NEW PRO
      Reading Progress Bar HOT
      Custom JS
      Blockquote
      Counter Up
      Image Hover Effects
      Reveal NEW PRO
      Rellax PRO
      Positioning
      Image Comparison
      Tabs
      Toggle Content HOT PRO
      Post/Page Duplicator FREE
      Icons Extended
      Floating Effects PRO
      Mega Menu HOT
      Custom CSS HOT
      Gradient Headline
      Advanced Image
      Nav Menu
      Tooltips
      Comparison Table PRO
      Glassmorphism
      Featured Product PRO
      Image Carouse
      Gallery Slider NEW PRO
      Dynamic Tags NEW
      Countdown Timer
      Current Time
      Patterns
      Wrapper Link
      Timeline
      Team Member
      Contact Form 7
      Advanced Accordion
      Animated Headlines
      Blog
      Business Hours
      Call To Action
      Progress Bars
      Background Slider
      Team Slider
      Dynamic Table
      Grid Line PRO
      WP Forms
      Search
      We Form
      Entrance Animation NEW PRO
      Display Conditions PRO
      Filterable Image Gallery
      WP Forms
      Custom Breakpoints NEW
  • Features
    • Theme Builder

      Design site-wide templates for a consistent look across every page of your website.

      Popup Builder

      Create engaging popups, modals, and announcement bars - to capture leads.

      Widget Builder

      Expand Elementor with advanced custom widgets to build more dynamic layouts.

      Mega Menu Builder

      Create multi-column menus with icons and images for superior navigation.

      Custom Css

      Apply your own CSS for pixel-perfect styling beyond default design options.

      Dynamic Tags

      Insert dynamic content like post titles and custom fields directly into designs.

      Display Conditions

      Control element visibility based on user role, device, time, and other rules.

      Icons Library

      Choose from thousands of built-in icons to enhance visuals and consistency.

      Animation

      Add scroll, hover, entrance, and much more animations to bring designs to life.
  • Template Kits
    • Template Kits

      Professionally designed full-page template Kit. Import and customize in seconds.

      Ready Sections

      Pre-built content sections and rows. Drag, drop, and customize instantly.

      Ready Popups

      Different types of High-converting popup designs. Import and launch quickly.

      Ready Pages

      Complete page layouts for any purpose. Start editing immediately.

      Ready Header

      Multiple modern header designs. Import and adapt to your brand.

      Ready Footer

      Fully designed footers for different websites. Add functionality and style in clicks.
  • Brands
    • WP Adminify

      Take control of your WordPress dashboard. Customize the admin experience.

      Admin Bar Editor

      Customize the WordPress admin bar for a cleaner, more personalized workspace.

      Loginfy

      Customize your WordPress login page with branding, styles, and security enhancements.

      Rolemaster Suite

      Manage user roles and permissions with precision for better security and workflow.

      Master Blocks

      Expand the Gutenberg editor with advanced custom blocks for more creative layouts.

      WP Spotlight

      Instantly search and access admin features, posts, and settings from anywhere.
  • Themes
  • Help
    • Get Support
    • Documentation
    • Facebook Community
    • Changelogs
  • Blog
Purchase Now

Getting Started

  • Can’t see the Master Addon Element inside Elementor Page editor?
  • How To Apply For an Affiliate Account?
  • Active Pro version
  • Installing Plugin

Addons

  • Off-Canvas Content
  • Logo Slider
  • Progress Bars
  • Image Carousel
  • Featured Product
  • Comparison Table
  • Source Code
  • Advanced Image
  • Gradient Headline
  • Gallery Slider
  • Toggle Content
  • Infobox
  • Timeline
  • Dynamic Table
  • Mailchimp
  • Blockquote
  • Changelogs
  • Countdown Timer
  • Current Time
  • Search
  • Filterable Image Gallery
  • Team Slider
  • Counter Up
  • Restrict Content
  • Table of Contents
  • Image Hotspot
  • Image Comparison
  • News Ticker
  • Image Hover Effects
  • Tabs
  • Pricing Table
  • Navigation Menu
  • Domain Search
  • Flipbox
  • Tooltip
  • Creative Links
  • Business Hours
  • Contact Form 7
  • Creative Button
  • Animated Headlines
  • Advanced Accordion
  • Call to Action
  • Progress Bar
  • Blog
  • Team Member
  • Dual Heading

Extensions

  • Which Element
  • Post Duplicator
  • Grid Line
  • Glassmorphism
  • Tooltip
  • Wrapper Link
  • Floating Effects
  • Dynamic Tags
  • Display Conditions
  • Entrance Animation
  • Custom Breakpoints
  • Animated Gradient Background
  • Reveal
  • Particles
  • Background Slider
  • Transforms
  • Rellax
  • Positioning
  • Custom CSS

Widget Builder

  • Widget Builder Settings Panel Introduction
  • Divider
  • Text Shadow
  • Select2
  • Border
  • Heading
  • Tabs
  • Repeater
  • Visual Choice
  • Background
  • Dimensions
  • Box Shadow
  • Slider
  • Icons
  • Gallery
  • Media
  • Popover Toggle
  • Widget Builder URL Field
  • Date Time
  • Typography
  • Font
  • Widget Builder Color Field
  • Choose
  • Select
  • Switcher
  • Hidden
  • Code
  • WYSIWYG
  • Widget Builder Textarea Field
  • Number
  • Widget Builder Text Field

Theme Builder

  • Comment Form
  • 404
  • Search
  • Archive
  • Single
  • Footer
  • Header

Popup Builder

  • How to Open a Popup After Inactivity in Elementor
  • How to Show an Exit Intent Popup in Elementor
  • How to Open a Popup on Scroll to a Specific Element in Elementor
  • How to Open a Popup on Scroll in Elementor
  • How to Open a Popup on Click in Elementor
  • How to open a popup on page load?
  • Popup Settings & Options

Template Kit

  • How to Import Template Kits in Master Addons
  • How to Disable Elementor Default Fonts and Colors
  • Import Elementor Template Kits
View Categories
  • Home
  • Docs
  • Widget Builder
  • Switcher

Switcher

Roy
Updated on June 30, 2026

5 min read

The Switcher option is a visual toggle control that adds an on/off switch to your custom widget’s settings. It provides a clear, user-friendly way to enable or disable a feature or choose between two simple states.

Why would someone use it in a custom widget? #

Use a Switcher control whenever you need a simple binary choice, like showing/hiding an element, enabling an animation, or toggling a style mode. It’s more intuitive than a checkbox and clearly communicates an active/inactive state.

Where This Option Appears #

  • In Widget Builder: You add this control in the Content tab.
  • In the Elementor Editor: Once saved, it appears as a horizontal slider switch with customizable labels (like “Yes”/”No” or “Show”/”Hide”) right in your widget’s settings panel.

Available Settings #

Here are the configurable settings for the Switcher control:

Basic Settings #

  • Label: The name of the control shown above the switch (e.g., “Show Icon”, “Enable Parallax”).
  • Name: The unique machine-readable ID (like show_icon) for the dynamic shortcode.
  • Description: Optional helper text below the control.
  • Label On: The text displayed next to the switch when it is in the ON (checked) position (e.g., “Yes”, “Show”, “Enabled”).
  • Label Off: The text displayed when it is in the OFF (unchecked) position (e.g., “No”, “Hide”, “Disabled”).
  • Return Value: The actual value that the shortcode {{name}} will output when the switch is ON. You can customize this (default is yes).
  • Default Value: Sets the starting state of the switch (On or Off).

Advanced Settings #

  • Show Label, Label Block, Responsive Control: Standard visibility and layout options.
  • Dynamic Support: When enabled, the switch’s state can be controlled by a dynamic source (though this is a less common use case).
  • Frontend Available: When enabled, the switch’s value (yes/no or your custom return value) is passed to your widget’s frontend JavaScript.
  • Separator, Conditions, Control Classes: Standard advanced options for layout and logic.

Generated Shortcode #

When you add a Switcher control with the Name show_title, Widget Builder generates the shortcode: {{show_title}}.

  • What it represents: This shortcode outputs the Return Value (e.g., yes) if the switch is ON. If the switch is OFF, it outputs an empty string or a falsey value.
  • Where to use it:
    • HTML Panel: Perfect in conjunction with a Condition attribute to include/exclude markup: <h3 class="title" data-show="{{show_title}}">My Title</h3>.
    • CSS Panel: To apply conditional styles: .title { display: {{show_title}}; } (This would set display: yes; which is invalid. Better practice is shown below).
    • JS Panel: To control logic: if ( '{{show_title}}' === 'yes' ) { // show the title }.

How to Use It: A Practical Example #

Let’s create a “Card” widget where the user can choose to show or hide the card’s footer.

  1. In Widget Builder’s Content tab, add a Switcher control.
  2. Set the Label to Show Footer.
  3. Set Label On to Show and Label Off to Hide. Keep the Return Value as yes.
  4. Set the Default Value to Yes (On).
  5. In your HTML panel, wrap the footer HTML in a conditional check:

    <div class=”card-body”>Main Content</div> {{show_footer}} <div class=”card-footer”>Footer Content</div> {{/show_footer}}

    (Note: This pseudo-code illustrates the concept. Actual conditional rendering might use different syntax specific to Widget Builder or be handled via CSS/JS.)
  6. A more common method is using the value in CSS: .card-footer { display: {{show_footer}} ? block : none; } (This requires JS logic. Often, you’d use a CSS class controlled by the shortcode).

Practical CSS/JS Method: Add a CSS class to the footer element that is controlled by the switcher’s value.

  • HTML: <div class="card-footer {{show_footer}}">Footer</div> (When ON, class becomes card-footer yes).
  • CSS: .card-footer.yes { display: block; } .card-footer:not(.yes) { display: none; }

Common Use Cases #

  • Visibility Toggles: Show or hide elements like titles, icons, dividers, or entire sections.
  • Feature Activation: Enable/disable animations, hover effects, sticky behavior, or custom scripts.
  • Style Mode Selectors: Switch between simple style alternatives (e.g., “Simple”/”Detailed” view) often paired with Conditions to show different setting sets.
  • Boolean Logic Driver: The primary control for Conditions that show/hide other, more complex controls.

Helpful Tips #

  • Use Clear, Action-Oriented Labels: A label like “Show Divider” with “On”/”Off” states is clearer than a vague “Divider State”.
  • Customize Return Values for Clarity: For a “Style Mode” switcher, you could set Return Value to detailed instead of yes. This makes your code more readable: if ( '{{style_mode}}' === 'detailed' ).
  • It’s the Perfect Conditional Trigger: The Switcher is the most intuitive control to use as the condition for showing/hiding groups of other options. Use the Conditions feature liberally.
  • Test the Output: Remember, the shortcode outputs the text string of your Return Value. Ensure your HTML, CSS, or JS logic is checking for that exact string.

The Switcher is a fundamental control for creating interactive, user-friendly widget interfaces. It simplifies complex choices into a single, clear action.

Frequently Asked Questions #

What is the Switcher control used for?

The Switcher is a visual toggle control that adds an on/off slider switch to your custom widget’s settings. It is best for simple binary choices such as showing or hiding an element, enabling an animation, or toggling a style mode, and it communicates an active or inactive state more intuitively than a checkbox. You add it in the Content tab of Widget Builder.

How do I change the text shown next to the switch?

Use the Label On and Label Off settings. Label On is the text displayed when the switch is in the ON (checked) position, such as “Yes”, “Show”, or “Enabled”, and Label Off is the text shown when it is OFF, such as “No”, “Hide”, or “Disabled”. The Label setting above the switch names the control itself, for example “Show Icon”.

What value does the Switcher shortcode output?

The shortcode outputs the Return Value when the switch is ON, which defaults to yes, and an empty or falsey value when the switch is OFF. So a Switcher named show_title produces {{show_title}}, returning yes when enabled. You can customize the Return Value, for example setting it to detailed so your code reads if ( ‘{{style_mode}}’ === ‘detailed’ ).

Can I use the Switcher to show or hide other controls?

Yes, the Switcher is the most intuitive control to use as a Conditions trigger. Because it produces a clear true/false style value, you can use it to conditionally show or hide groups of other settings in your widget, such as revealing a detailed set of options only when the switch is ON. The documentation recommends using the Conditions feature liberally with it.

Does the Switcher value reach my frontend JavaScript?

Yes, if you enable the Frontend Available option in the Advanced settings. When enabled, the switch’s value (yes/no or your custom Return Value) is passed to your widget’s frontend JavaScript so you can drive interactive behavior. Just make sure your HTML, CSS, or JS logic checks for the exact string your Return Value produces.

What are your Feelings

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on June 30, 2026
SelectHidden
Table of Contents
  • Why would someone use it in a custom widget?
  • Where This Option Appears
  • Available Settings
    • Basic Settings
    • Advanced Settings
  • Generated Shortcode
    • My Title
  • How to Use It: A Practical Example
  • Common Use Cases
  • Helpful Tips
  • Frequently Asked Questions
    • What is the Switcher control used for?
    • How do I change the text shown next to the switch?
    • What value does the Switcher shortcode output?
    • Can I use the Switcher to show or hide other controls?
    • Does the Switcher value reach my frontend JavaScript?

Join 40,000+ Web Creators Who Trust Master Addons

Get all the premium widgets and templates you desire, built with clean code that keeps your site fast. Ditch the bloat, not the features.

Try Live Demo
Join The Community
Master Addons for Elementor
Master Addons Logo

110+ Premium Widgets & Lifetime Updates – Build Beyond Limits. An Exclusive Creation by Pixar Labs

Facebook-f Twitter Youtube Wordpress
Features
  • Template kits
  • Template Library
  • Widget Builder
  • Theme Builder
  • Mega Menu Builder
  • Template kits
  • Template Library
  • Widget Builder
  • Theme Builder
  • Mega Menu Builder
Support
  • Support Forum
  • Contact US
  • Join Community
  • Blog
  • Support Forum
  • Contact US
  • Join Community
  • Blog
Resources
  • Apply For Affiliate
  • Documentation
  • Video Tutorials
  • My Account
  • Change Log
  • Apply For Affiliate
  • Documentation
  • Video Tutorials
  • My Account
  • Change Log
Navigate
  • Terms of Use
  • Refund Policy
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Privacy Policy