Skip to main content

Switch

The Switch element allows you to create an on/off control, often used for toggling features or activating functions in a project.

Summary:
This guide explains how to add a Switch element in AVStudio, access its configuration panel, and customize its dimensions, appearance, and actions.


Adding a Switch Element

There are several ways to add a Switch element in AVStudio.

  1. From Page Containers

    • Go to Container under Page Containers.
    • Click the dropdown arrow, select Elements, and choose Add Element.
    • In the Type list, select Switch, then click Add Element.
    • Add Switch from Page Containers
  2. By right-clicking on the Editor

    • Right-click anywhere on the Editor.
    • Select Add Element.
    • From the Type dropdown, select Switch, then click Add Element.
  3. By dragging from the elements list

    • On the right side of the Editor, locate the Switch element icon in the elements panel.
    • Click and drag the icon onto the Editor.
    • The Switch element will be added automatically.
    • Drag Switch to Editor

Switch Properties

When the Switch element is selected in the Editor, its properties appear on the right-hand panel. These settings allow you to configure its behavior, design, and interaction.

Switch friendly name

Specifies the name of the element. Click the edit icon to rename it. This name helps identify the element in the Editor and across the project.

Switch dataset source

Determines the source of data for the Switch.

OptionDescription
StaticNo additional configuration is required.
DynamicOpens the Select datasource to work with modal, where you can select an available data source.

Dimensions

Defines the size of the element.

  • Configure Width and Height.
  • Enter values directly or use {-} to set dynamic dimensions.
  • Switch between px (pixels) and % (percentage) as needed.

Mode selector by index or name

Specifies the mode of the switch using an index or name.

  • Enter a value directly or click the fx icon to open the Assign post-processing function dropdown.
  • Use {-} to open the Pick dynamic value modal to configure variables, parameters, or state entries.

Available switch modes

Lists all defined switch modes.

  • The Default mode is included automatically.
  • Click the + icon to open the Create new switch mode modal, where you can:
    • Set a Name.
    • Choose whether to copy from the default mode.
    • Toggle Separate actions for this switch mode.
    • Add the new mode.

Switch CSS classname

Defines the CSS class for styling the element.

  • Enter a class name directly or use {-} to link a dynamic source.
  • Default class name: switchElement.
  • Click the fx icon to open the Select post-processing function dropdown.

Sizing

Controls the visual proportions of the Switch element, including text size, overall switch size, and internal spacing.

PropertyDescriptionUnits
Text sizeDefines font size for switch labels. Enter a value or use {-} dynamically.px, vh, vw
Switch sizeChoose between small or normal size.
Inner content gapSets spacing between inner elements. Enter a value or use {-} dynamically.px, em, vh, vw

Design

Controls appearance and visual effects.

PropertyDescription
Font familyChoose a font (default Default).
Switch orderSet layout order: normal or reverse.
Switch on-state background colorOpens a color picker for the active state.
ReflectAdds reflection. Options: None, Enabled.

When Reflect is enabled:

SubsettingDescriptionDefault
AlignChoose reflection alignment (e.g., Bottom).
OffsetAdjust vertical distance.
Start opacitySet starting opacity.100
End opacitySet end opacity.0

Text

Defines the text shown when the switch is toggled on or off.

FieldDescriptionDefault Label
TextOpens the Edit text modal for formatting or variables.
Switch on textAppears when switch is on. Accepts dynamic values via {-}.ON Text
Switch off textAppears when switch is off. Accepts dynamic values via {-}.OFF Text

Actions

Defines what happens when the user interacts with the Switch.

  1. Click Add new action.
  2. The Create new action for switch modal opens.
  3. Configure:
    • Name — action name.
    • Behaviour — when it triggers (e.g., On Change).
    • Execution Delay — delay in ms.
  4. Select a target tab: Crestron, Routing, Variables, Parameters, Overlays, Functions, HTTP Web Requests, Web Sockets, or Audio.
  5. Example (Crestron tab):
    • TypePush Digital.
    • Signal Name — enter or assign.
    • Choose Push onChange Value or Push custom Value.
  6. Click Create action to save.

State

Controls the visibility and signal states of the Switch.

Visibility

SettingDescription
Orientation visibilityShow in Both, Portrait, or Landscape.
Direct value / Crestron FBControl visibility directly or via Crestron feedback.
Visibility dynamic valueUse {-} to control visibility dynamically.
Reserve space while hiddenKeeps layout spacing when hidden.

Disabled signal

Defines whether the Switch is disabled via signal input.

PropertyDescriptionDefault
Disabled signalEnter a signal name or use {-}.Now Always Enabled

Checked status signal

Specifies control state for the Switch.

PropertyDescriptionDefault
Checked status signalEnter a signal name or use {-}.No Checked Control State

Key Points

  • Use short, descriptive names for better project navigation.
  • Use Dynamic data sources for reactive switch states.
  • Keep Reflect and Design simple for performance on large projects.

Frequently Asked Questions (FAQ)

What’s the difference between a Switch and a Toggle?
They are functionally similar. The Switch is used for binary control, while Toggle may include more customized visual behavior.

Can I bind multiple actions to one Switch?
Yes. You can add several actions with different targets (e.g., Crestron + HTTP Web Request) and control their sequence using Execution Delay.