Live Developer Training: next batch coming soon. Be the first to know.Live training: next batch soonJoin the waitlist →Join →

Power Apps Toggle Control + 10 Examples

In Power Apps, toggle control allows users to interact with an application by switching between actions, like On and Off, with a simple click.

In this article, I will explain the usage of toggle control in Power Apps using 10 different examples.

Power Apps Toggle Control

The toggle control in Power Apps is a simple switch that users can turn on or off by sliding its handle. It works like a checkbox.

Refer to the screenshot below for toggle control. We also have Modern Toggle Control.

powerapps toggle value

Power Apps Toggle Control Properties

Next, we’ll discuss the Power Apps toggle control properties. Have a look at the below table.

PropertyDescription
DefaultIt is the initial value of a control before the user changes it
DisplayModeIt allows whether it is in Edit mode, View mode, or in Disable mode
FalseFillWhen the Toggle switch control is off, then the toggle fills with color
FalseHoverFillWhen the Toggle switch control is off, then the toggle hover fills with color
FalseTextIt helps to show the text value when the toggle switch is off
FillIt provides the background color of a toggle control
HandleFillIt provides the color to the toggle handle
OnChangeWhen the user changes the value of a control, then it specifies how the app responds
OnCheckWhen the toggle value changes to true, then it specifies how the app responds
OnSelectIt specifies how the app responds when the user hits the control
OnUncheckIt specifies how the app responds when the user changes the control value to false
Reset It helps the control back to its default value
TrueFillWhen the toggle switch is on, then the toggle fills with color
TrueHoverFillWhen the toggle switch is on, then the toggle hover fills with color
TrueText It helps to show the text value when the toggle switch is on
Visible It specifies whether the toggle switch control is displaying or hidden

How to Add a Toggle Control in Power Apps

Here, I will show you how to add a toggle control in the Power Apps. Add a Toggle control [+ Insert > Inputs > Toggle] on the Power Apps screen, as shown below.

powerapps toggle yes no

Once you add a toggle control, its OnChange property is false, and its name is Toggle1, as shown below.

power apps toggle

How to Set Toggle Control Values for On and Off States

Now, I will show you how to set the Power Apps toggle control values with a simple example.

Example:

In Power Apps, there is a Toggle control and a Text label. I want the text label to display”500″ when the toggle is ON and “100” when it is OFF.

To do so, provide the formula below in the Text property of the text label.

Text = If(
    tgl_Value.Value = true,
    "Price: $100",
    "Price: $500"
)

Here,

  • tgl_Value is the control name.
powerapps toggle value if statement

Now, save, publish, and preview the app. It displays the values based on the toggle control state. Refer to the image below.

Output:

toggle in powerapps

How to Change PowerApps Toggle Control On/Off values to Yes/No

Here, we’ll see how to change the toggle control On/Off values to Yes/No with a simple example.

I have a SharePoint Online list named “Project Status List,” which contains the fields below.

Column NameData Type
Project NameIt is a default single line of text
Is ApprovedYes/No
toggle powerapps

When I add this Yes/No field in the Power Apps Edit form, all the toggle text values appear with “On/Off” instead of “Yes/No,” as shown below.