Skip to main content

How to Add a Text Control in Power Apps

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

The Text control is the modern way to show words on a canvas app screen: a heading, a message, or the result of a formula, such as the signed-in person's name. It's the modern replacement for the classic Label. Here's how to add one, fill it with a formula, and make it grow when the text is long.

Prerequisites​

Step 1: Insert a Text Control​

Select the container, open Insert, and select Text, under Display or at the top of Recommended:

The Insert pane with the Display category expanded, listing Text, Information button, Icon, Avatar, Badge, Card, Progress bar, Spinner, Link, Timer and HTML text, with Text outlined in red

It arrives showing the word Text:

A new Text control in the profile area of the Home screen showing Text, with the properties pane showing Auto height Off, Padding 5, Flexible height Off, Height 32, Font size 15 and Vertical align Middle

Rename it; the example's three are lblWelcomeHS, lblJobTitleHS and lblManagerHS.

Step 2: Set Its Text​

Choose Text in the property list and type a formula. Plain words go in double quotes; anything else is a formula:

lblWelcomeHS → Text
"Welcome, " & Coalesce(MyProfile.givenName, MyProfile.displayName)

The example joins a greeting to the person's first name; see How to Join Text in Power Apps and How to Replace Blank Values in Power Apps with Coalesce.

For plain text, you can also double-click the control on the canvas and type directly.

Step 3: Size and Weight​

PropertyExampleDefault
Size2415
FontWeightFontWeight.SemiboldFontWeight.Normal
ColorLeave empty to follow the theme

The example makes the welcome line larger and semibold, and leaves the other two at the default size.

Step 4: Let It Grow with Auto Height​

Long text, or a narrow phone screen, can need more lines than the control's height allows. Turn on Auto height so the control grows to fit:

lblJobTitleHS → AutoHeight
true

Wrap is on by default, so the text breaks onto new lines. If the Text control sits in a container with a fixed height, the container also needs to grow; see Fixed: Text Is Cut Off Inside a Container on Small Screens in Power Apps.

Step 5: Give It an Accessible Label​

Studio's App checker flags new Text controls with Missing accessible label. Set AccessibleLabel to the control's own text:

lblJobTitleHS → AccessibleLabel
Self.Text

See Fixed: Missing Accessible Label in the Power Apps App Checker.

Common Mistakes​

MistakeWhat happensDo this instead
Forgetting the quotes around plain wordsPower Apps reads them as names and shows an error"Welcome"
Leaving Auto height off for long textText is cut offTurn Auto height on
Using a Text control as a screen headingScreen readers don't treat it as a headingUse a classic label with Role; see How to Add a Heading for Screen Readers

Troubleshooting​

SymptomLikely causeFix
The control shows nothingThe formula returns blankCheck the preview strip under the formula bar
The text is cut offFixed heightAuto height on, and let the container grow
An error icon on the controlThe formula has an errorHover the red underline in the formula bar

FAQ​

Text control or classic Label?​

Use the Text control. It follows the theme and is the modern replacement. Keep the classic Label for headings, because only it has Role.

Can a Text control be clicked?​

Yes. It has an OnSelect property. For actions, though, a Button is clearer to users.

What's FontWeight?​

How heavy the text is: FontWeight.Lighter, Normal, Semibold or Bold.

Conclusion​

Insert Text, put a formula in its Text property, adjust Size and FontWeight, turn on Auto height for anything that might wrap, and give it an AccessibleLabel.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.