Skip to main content

How to Add a Badge Control in Power Apps

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

A badge is a small colored label for a short piece of information: a status, a count, a category. The modern Badge control follows the app's theme and has a property, Intent, that picks a color for what the badge means.

Prerequisites​

Step 1: Insert a Badge​

Select where it should go (for a gallery, a control in its template), then Insert → Display → Badge:

The Insert pane with the Display category listing Text, Information button, Icon, Avatar and Badge, with Badge outlined in red, next to the My Plan screen on the canvas

In the example, the new badge read AB, in green:

A gallery whose rows each show a small green pill reading AB, and the properties pane of Badge1 with Content AB, Icon No value, Icon position Before, Display mode Edit, Position 40, 40, Size 64 by 32, and Appearance Tint

Its defaults were:

PropertyDefault
Content"AB"
IntentBadgeIntent.Positive
AppearanceBadgeAppearance.Tint
ShapeBadgeShape.Circular
Width, Height64, 32
AccessibleLabelEmpty

Rename it with the bdg prefix (Power Apps Naming Conventions), for example bdgStatusMPS.

Step 2: Set What It Shows​

Content is the text. In a gallery, it usually comes from the row:

bdgStatusMPS → Content
ThisItem.Level.Value

The formula bar with the Content property of the badge set to ThisItem.Level.Value with Data type text, and the gallery's badges reading Intermediate, Beginner, Intermediate and Intermediate

Keep it short: Microsoft's examples are 5, New and Active (Badge modern control). Make the badge wide enough for the longest text it can show.

Step 3: Choose a Color With Intent​

Intent describes what the badge means, and the color follows: BadgeIntent.Neutral, Highlight, Informative, Positive, Attention, Caution, Urgent or Critical. To change it per row, use a formula, such as Switch:

bdgStatusMPS → Intent
Switch(
ThisItem.Level.Value,
"Beginner", BadgeIntent.Neutral,
"Intermediate", BadgeIntent.Informative,
"Advanced", BadgeIntent.Highlight,
BadgeIntent.Positive
)

The formula bar with the Switch formula for Intent, and gallery rows with badges reading Intermediate, Beginner, Advanced, Expert and Advanced in different colors: Expert in green and Advanced in a blue tint

If you've seen ThemeColor in older tutorials: Microsoft renamed it to Intent in the updated Badge. Appearance sets the style (Filled, Ghost, Outline or Tint), and Shape the corners (Circular, Rounded or Square).

Step 4: Give It an Accessible Label​

Microsoft recommends an AccessibleLabel that says what the badge means, not just its short text. The Career Development Plan app's status badge uses:

bdgStatusMPS → AccessibleLabel
"Status: " & ThisItem.StatusText

Common Mistakes​

MistakeWhat happensDo this instead
Reading the badge's own text with Self.ContentName isn't valid. 'Content' isn't recognizedUse the same source value, such as ThisItem.Level.Value
Using ThemeColorIt's now called IntentSet Intent
Relying on color aloneSome people can't tell the colors apartPut the meaning in Content too

Troubleshooting​

SymptomLikely causeFix
The badge reads ABContent is still the defaultSet Content
Text is cut offThe badge is too narrowIncrease Width

FAQ​

Can a badge be clicked?​

Yes. Microsoft says a badge with an OnSelect formula acts as a button and responds to Enter and Space. Without one, it's display-only.

Can a badge show an icon?​

Yes, with Icon and IconPosition. Give an icon-only badge an AccessibleLabel.

Conclusion​

Insert Display → Badge, set Content to a short value, choose Intent by meaning (with Switch when it varies), and add 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.