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
      Floating Effects PRO
      Mega Menu HOT
      Custom CSS HOT
      Gradient Headline
      Advanced Image
      Nav Menu
      Tooltips
      Comparison Table PRO
      Glassmorphism
      Featured Product PRO
      Image Carousel
      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.

      Elementor Page Templates

      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

      WP Adminify

      Take control of your WordPress dashboard. Customize the admin experience.
      Admin Bar Editor

      Admin Bar Editor

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

      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

      Master Blocks

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

      WP Spotlight

      Instantly search and access admin features, posts, and settings from anywhere.
  • Themes
  • Help
    • Get Support
    • Documentation
    • Facebook Community
    • Changelogs
  • Blog
Pricing
🇺🇸EN
  • 🇺🇸EN
  • 🇸🇦AR
  • 🇧🇩BN
  • 🇩🇰DA
  • 🇩🇪DE
  • 🇪🇸ES
  • 🇫🇷FR
  • 🇮🇳HI
  • 🇰🇷KO
  • 🇵🇹PT
  • 🇷🇺RU
  • 🇨🇳ZH

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

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

Extensions

  • Icon Library Settings
  • Mega Menu Settings
  • Which Element Extension Settings
  • Post/Page Duplicator Extension Settings
  • Grid Line Extension Settings
  • Glassmorphism Extension Settings
  • Tooltip Extension Settings
  • Wrapper Link Settings
  • Floating Effects Extension Settings
  • Dynamic Tags Settings
  • Display Conditions Extension Settings
  • Entrance Animation Settings
  • Custom Breakpoints Settings
  • Animated Gradient BG Extension Settings
  • Reveal Extension Settings
  • Particles Extension Settings
  • Background Slider Extension Settings
  • Transforms Extension Settings
  • Rellax Extension Settings
  • Positioning Extension Settings
  • Custom CSS Settings

Widget Builder

  • Conditions
  • Twig Syntax
  • Settings Panel Introduction
  • Divider
  • Text Shadow
  • Select2
  • Border
  • Heading
  • Tabs
  • Repeater
  • Visual Choice
  • Background
  • Dimensions
  • Box Shadow
  • Slider
  • Icons
  • Gallery
  • Media
  • Popover Toggle
  • URL Field
  • Date Time
  • Typography
  • Font
  • Color Field
  • Choose
  • Select
  • Switcher
  • Hidden
  • Code
  • WYSIWYG
  • Textarea Field
  • Number
  • 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 Jemee
Updated on September 18, 2026

7 min read

The Switcher field adds an on/off toggle to a custom widget you build with the Master Addons Widget Builder. It’s the standard way to make part of a widget optional: a badge, an icon, a compact layout. Editors flip the toggle in Elementor and your template reacts.

Switcher is one of the fields you can use in the free version’s Widget Builder. The free plugin includes a limited Widget Builder, and the full set of fields comes with Master Addons Pro.

Switcher field settings in the Master Addons Widget Builder next to the Show Badge toggle in Elementor for a promo card widget

What the Switcher field does #

  • Adds Elementor’s on/off toggle to your widget’s panel.
  • Saves the Return Value (yes by default) when on, and an empty value when off.
  • Works with {% if %} in your template, so markup appears only when the toggle is on.
  • Can hide and show other fields in the panel through Conditions, which keeps the panel short until an option is in use.

New to the builder? Read the Widget Builder overview first, then come back with a widget open.

Before you start #

  • WordPress with Elementor installed and active.
  • Master Addons for Elementor installed and active. The installation guide covers setup.
  • A widget open in the Widget Builder. The example in this guide is a “Promo Card” widget with two Switchers: show_badge, which reveals a ribbon and a Badge Text field, and compact_mode, which tightens the card.

How to add a Switcher field #

  1. Go to Master Addons > Widget Builder and open your widget.
  2. Add a section on the tab where the option belongs. A content option like Show Badge fits the Content tab.
  3. Type switch in the field search box on the left.
  4. Drag Switcher into the section. Click the pencil on the field to open its settings.
Switcher field found by searching switch in the Widget Builder with Show Badge and Compact Mode fields in the Promo section

Switcher field options explained #

Switcher field options with Label, Name, Description, Label On, Label Off, Return Value and a Default Value dropdown
  • Label: the text next to the toggle in Elementor, for example “Show Badge”.
  • Name: the field’s unique ID and the name of its token. Use letters, numbers and underscores only, for example show_badge.
  • Description: a hint shown under the toggle in Elementor.
  • Label On and Label Off: the short words inside the toggle. Elementor shows Label On while the toggle is on and Label Off while it’s off, so “Compact” and “Normal” read better than Yes and No for a layout option.
  • Return Value: the value the field holds while on. Leave it at yes unless something in your code needs a different string.
  • Default Value: a dropdown with Yes and No. Yes means a newly added widget starts with the toggle on.

Two things worth knowing about this panel. The help text under Label On and Label Off is swapped, and the Label Off line starts with a stray extra T. Both labels still work the way you’d expect: Label On is the word shown while the toggle is on.

Keep Return Value and Default Value in step #

The Default Value dropdown always saves yes for Yes, whatever you typed in Return Value. That combination misfires. In our tests, a field with Return Value enabled and Default Value Yes came out like this:

  • The toggle in Elementor showed as off.
  • The saved value was still yes, so {% if %} treated the field as on and the markup rendered.
  • The panel and the page only agreed again after an editor clicked the toggle once, which set the value to enabled.

So change Return Value only when you also plan to start the field off (Default Value set to No). For everything else, leave Return Value at yes.

Use the toggle in your template #

A Switcher is empty when off, and an empty value is false in the template engine, so {% if %} is all you need. The Promo Card HTML uses one Switcher for markup and one for a class:

<div class="promo{% if compact_mode %} promo--compact{% endif %}">
  {% if show_badge %}
  <span class="promo-badge">{{ badge_text }}</span>
  {% endif %}
  <p class="promo-title">{{ promo_title }}</p>
  <p class="promo-text">{{ promo_text }}</p>
  <a class="promo-button" href="#">Claim the offer</a>
</div>
Widget HTML wrapping the badge in an if block on show_badge and adding a compact class from compact_mode

With the badge off, the whole span is gone from the page, not just hidden. The compact class switches a few rules in the CSS panel:

.promo--compact { padding: 18px 22px; }
.promo--compact .promo-title { font-size: 20px; }
.promo--compact .promo-text { display: none; }

You can compare the value too, as in {% if show_badge == 'yes' %}, but compare against the Return Value, not the Label On text. {% if show_badge == 'Yes' %} never matches. The plain {% if show_badge %} form avoids the problem.

Leave the Selector box empty for this field. A toggle value isn’t a CSS value, so styling belongs in the CSS panel behind a class like the one above.

Hide other fields until the toggle is on #

This is the second half of what a Switcher is for. On the field you want to hide, open its settings, scroll to Conditions and click Add Condition. For the Badge Text field:

  • Control Name: show_badge, the name of the Switcher.
  • Equality: Equal.
  • Control Value: yes, the Switcher’s Return Value.
Conditions row on the Badge Text field set to control name show_badge, Equal, value yes

Badge Text now appears in Elementor only while Show Badge is on. See Conditions for the other operators.

Use the Switcher control in Elementor #

Add the widget to a page, or reload the editor if the page was already open. The toggle sits under your label with your Label On or Label Off word inside it. Click it and the preview updates right away, and any field with a condition on it appears or disappears at the same time.

Elementor panel with Show Badge on and off, showing the Badge Text field and the badge appearing and disappearing

Here is the finished card on the front end with the badge on, with compact mode on as well, and with both switchers off:

Promo card on the front end with the badge on, with compact mode on, and with both switchers off

Common use cases #

  • Optional badges, ribbons and icons.
  • A compact or dense layout variant.
  • Show or hide a secondary button, a footer note or a divider.
  • A master switch that reveals a group of related fields in the panel.

Tips for working with the Switcher field #

  • Leave Return Value at yes. It keeps the toggle, the default and your conditions in step.
  • Name the field after what it shows, such as show_badge or compact_mode. The name reads like a question in {% if %}.
  • Write Label On and Label Off for the option, not just Yes and No, when the two states have names.
  • Pair it with Conditions so the fields an option needs only show up when it’s on.
  • More than two states? Use the Select field for a dropdown or the Choose field for icon buttons.

Frequently Asked Questions #

Is the Switcher field available in the free version?

Yes. Switcher is one of the fields you can use in the free version’s Widget Builder. The full set of Widget Builder fields comes with Master Addons Pro.

What value does a Switcher print?

The Return Value (yes by default) while the toggle is on, and nothing while it’s off. That makes {% if my_toggle %} the natural check.

How do I make a widget start with the toggle on?

Set Default Value to Yes and leave Return Value at yes. A custom Return Value with Default Value Yes leaves the panel and the page out of step until an editor clicks the toggle.

How do I show another field only when the toggle is on?

Add a condition on that field with Control Name set to the Switcher’s name, Equality Equal and Control Value yes.

Why doesn’t my {% if my_toggle == ‘Yes’ %} check work?

It compares against the Label On text. Compare against the Return Value instead, as in {% if my_toggle == 'yes' %}, or drop the comparison and use {% if my_toggle %}.

Wrapping up #

Add a Switcher, give it a clear name and labels, leave Return Value at yes, and wrap the optional part of your markup in {% if %}. Add a condition to the fields that option needs and the panel stays short until an editor turns it on. For three or more states, see the Select and Choose fields, and check pricing for what each plan includes.

What are your Feelings

Share This Article :

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

How can we help?

Updated on September 18, 2026
SelectHidden
Table of Contents
  • What the Switcher field does
  • Before you start
  • How to add a Switcher field
  • Switcher field options explained
    • Keep Return Value and Default Value in step
  • Use the toggle in your template
  • Hide other fields until the toggle is on
  • Use the Switcher control in Elementor
  • Common use cases
  • Tips for working with the Switcher field
  • Frequently Asked Questions
    • Is the Switcher field available in the free version?
    • What value does a Switcher print?
    • How do I make a widget start with the toggle on?
    • How do I show another field only when the toggle is on?
    • Why doesn't my {% if my_toggle == 'Yes' %} check work?
  • Wrapping up

Join 30,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

80+ 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
Support
  • Support Forum
  • Contact US
  • Join Community
  • Blog
  • Video Reviews
Resources
  • My Account
  • Changlogs
  • Documentation
  • Video Tutorials
  • Toolz.dev
Navigate
  • Apply for Affiliate
  • Terms of Use
  • Refund Policy
  • Privacy Policy
  • About Us