Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kMSC8o2vWekOB+UVPKAsRf
Power Apps - Building Power Apps
Unanswered

Responsive font size of labels inside component

Like (0) ShareShare
ReportReport
Posted on 12 Jun 2024 17:55:00 by 14

How can I make the font size of this text label within a custom component (an app footer) change according to screen size?
The following code (on the size property of this label) does not result on any change:

Switch(App.ActiveScreen.Size,1,12,2,14,3,16)
  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on 16 Jun 2024 at 18:50:59
    Re: Responsive font size of labels inside component

    Hi @fpsdf 

     

    My bad, can you try this:

    Switch(App.ActiveScreen.Size, ScreenSize.Small, 12, ScreenSize.Medium, 13, 14)

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • fpsdf Profile Picture
    14 on 13 Jun 2024 at 08:20:18
    Re: Responsive font size of labels inside component

    Thank you, @SpongYe!

    Yet, the Parent.Size part gets underlined in red, stating "Name isn't valid. 'Size' is not recognized.".

    Let me just remind you that this is a label inside of a custom component (I'll attach the hierarchy below)

     

    fpsdf_0-1718266786567.png

     

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on 12 Jun 2024 at 20:34:50
    Re: Responsive font size of labels inside component

    Hi @fpsdf 

     

    To increase the font automatically the ScreenSize can help with that when the canvas screen changes, try this formula:

    Switch(Parent.Size, ScreenSize.Small,12, ScreenSize.Medium,18,30)

    The font will be 12 in the small screen and 18 for the medium screen otherwise it will be 30 ,and you can change these font sizes to your desired font sizes.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 58 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started