The Switch element is a user interface component designed for toggling between two states—typically, an "on" and "off" position.

Overview

Also known as a toggle switch or a slider switch, this element provides a visually intuitive way for users to activate or deactivate a particular setting or option.

Physically resembling a small lever that can be moved horizontally, the Switch element visually conveys the current state by its position—either on or off. It is commonly used in settings menus, preference panels, or any scenario where users need a quick and straightforward method to enable or disable a feature.

The simplicity and clarity of the Switch element contribute to a user-friendly interface, making it easy for users to understand and control the activation of specific functionalities in applications or on websites.

Example

Create Switch element

Selecting switch element
Configuring switch value
  1. Login to your Joomla! Administrator
  2. Go to Components » Formea Form Builder » Elements
  3. Click on the "Create Element" at the top
  4. Select "Switch"
  5. Enter the generic field
  6. Enter the value in the "value" tab
  7. Configure the styling in "Switch Parameters" tab
  8. Save & Close
  9. Apply it in your form

Parameters

Available parameters for Switch element

Option Description
Size The size of the switch. See example above.
Use Custom Color Enable custom color for the switch
Unchecked Background The background color for the unchecked/unselected switch
Unchecked Border The border color for the unchecked/unselected switch
Checked Background The background color for the checked/selected switch
Checked Border The border color for the checked/selected switch
Error Background The background color for the switch in a state of an error
Error border The border color for the switch in a state of an error
On this page