web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / What are some creative...
Power Apps
Suggested Answer

What are some creative ways to build a toggle

(2) ShareShare
ReportReport
Posted on by 42
Hi Power Apper's
 
I'm looking for other creative ways to build a toggle to hide or show a sub feature or function on an app screen without using the default provided toggle control within Power Apps. I'm looking for approaches that elevate the UI experience of the app.
I found the below and want to see I can find more approaches to compare.
 
Thank you
 
- conToggle:
    Control: GroupContainer@1.3.0
    Variant: ManualLayout
    Properties:
      BorderColor: =RGBA(202, 202, 202, 1)
      BorderStyle: =BorderStyle.None
      DropShadow: =DropShadow.None
      Fill: =RGBA(255, 255, 255, 0.8)
      Height: =32
      RadiusBottomLeft: =16
      RadiusBottomRight: =16
      RadiusTopLeft: =16
      RadiusTopRight: =16
      Width: =32
      X: =Parent.Width - Self.Width - 2
      Y: =(64 - Self.Height)/2
    Children:
      - Image3_14:
          Control: Image@2.2.3
          Properties:
            BorderColor: =RGBA(0, 18, 107, 1)
            Height: =20
            Image: |-
              ="data:image/svg+xml," & If(
                  varToggle = true,
                  EncodeUrl(
                      "<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0,0,256,256'>
              <g fill='#005273' fill-rule='nonzero' stroke='none' stroke-width='1' stroke-linecap='butt' stroke-linejoin='miter' stroke-miterlimit='10' stroke-dasharray='' stroke-dashoffset='0' font-family='none' font-weight='none' font-size='none' text-anchor='none' style='mix-blend-mode: normal'><g transform='scale(3.55556,3.55556)'><path d='M46.023,59.542c-1.008,0 -2.016,-0.378 -2.794,-1.137l-20.046,-19.561c-0.771,-0.752 -1.206,-1.785 -1.206,-2.863c0,-1.078 0.435,-2.11 1.206,-2.863l20.007,-19.522c1.582,-1.542 4.113,-1.512 5.657,0.069c1.542,1.581 1.512,4.114 -0.069,5.656l-17.074,16.66l17.113,16.698c1.581,1.542 1.611,4.075 0.069,5.656c-0.783,0.803 -1.823,1.207 -2.863,1.207z'></path></g></g>
              </svg>"
                  ),
                  EncodeUrl(
                      "
              <svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='100' height='100' viewBox='0,0,256,256'>
              <g fill='#005273' fill-rule='nonzero' stroke='none' stroke-width='1' stroke-linecap='butt' stroke-linejoin='miter' stroke-miterlimit='10' stroke-dasharray='' stroke-dashoffset='0' font-family='none' font-weight='none' font-size='none' text-anchor='none' style='mix-blend-mode: normal'><g transform='scale(3.55556,3.55556)'><path d='M25.977,59.542c-1.04,0 -2.079,-0.403 -2.863,-1.207c-1.542,-1.581 -1.512,-4.114 0.069,-5.656l17.113,-16.698l-17.074,-16.66c-1.581,-1.542 -1.611,-4.075 -0.069,-5.656c1.544,-1.582 4.076,-1.612 5.657,-0.069l20.008,19.522c0.771,0.752 1.206,1.785 1.206,2.863c0,1.078 -0.435,2.11 -1.206,2.863l-20.047,19.56c-0.779,0.76 -1.787,1.138 -2.794,1.138z'></path></g></g>
              </svg>"
                  )
              )
            Width: =20
            X: =(Parent.Width - Self.Width) / 2 - 1
            Y: =(Parent.Height - Self.Height)/2
      - Button1_1:
          Control: Classic/Button@2.2.0
          Properties:
            BorderColor: =ColorFade(Self.Fill, -15%)
            Color: =RGBA(0, 0, 0, 0)
            DisabledBorderColor: =RGBA(166, 166, 166, 1)
            Fill: =RGBA(0, 0, 0, 0)
            Font: =Font.'Open Sans'
            Height: =32
            HoverBorderColor: =ColorFade(Self.BorderColor, 20%)
            HoverColor: =RGBA(0, 0, 0, 0)
            HoverFill: =
            OnSelect: |-
              =If(
                  varSideNavWidth = 278,
                  Set(varSideNavWidth, 96),
                  Set(varSideNavWidth, 278 )
              )
            PressedBorderColor: =Self.Fill
            PressedColor: =Self.Fill
            PressedFill: =Self.Color
            Text: =
            Width: =32
 
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     
    Here are several creative alternatives to the standard toggle control that can elevate your app’s interactivity and design:

    1. Custom Icon Toggle
    Use two icons (e.g., eye/eye-off, plus/minus, chevron up/down) and switch visibility based on a variable:
    • Use If(showSection, Icon.Visible, Icon.Hidden) to toggle between icons.
    • Animate or rotate icons for visual feedback.

    2. Animated Button Toggle
    Use a button styled as a pill or switch, and change its color/text/icon on click:

    3. Segmented Control (Radio Button Style)
    Use a horizontal Gallery or Radio control styled like a segmented switch:
    • Items: ["Show", "Hide"]
    • OnChange: UpdateContext({ showSection: Radio1.Selected.Value = "Show" })

    4. Swipe Gesture (Mobile UX)
    Use a slider or horizontal gallery to simulate swipe-to-toggle behavior.
    • Detect position or selected item to trigger visibility.

    5. Image-Based Toggle
    Use SVGs or PNGs as buttons (like your example), and change the image based on state.
    • You can even animate the transition using timers or transitions.

    6. Invisible Checkbox with Styled Container
    Use a hidden checkbox and wrap it in a styled container (rectangle + icon/text).
    • OnSelect of the container: Checkbox1.Value = !Checkbox1.Value
    • Bind visibility or styles to Checkbox1.Value

    Would you like a downloadable Power Apps component or JSON snippet for one of these toggle styles? I can generate one for you.
     
    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard