Introduction to Badge control
Badge control, like the Avatar control, is pretty neat. This is another one of the modern controls that I came to know about it only a few days ago. This control is used to show a content in a mode visual way. This control shows text with some color properties to emphasise the content.
Properties
- Content - The text/content to show inside the control. The default value is AB
- Shape - The shape of the badge. There are 3 different options:
- Appearance - The colors used when an image is not available. There are 3 different options:
- 'BadgeCanvas.Appearance'.Tint- Uses the theme of the app to decide the fill color in a faded/tinted form (default value)
- 'BadgeCanvas.Appearance'.Outline- Uses the theme of the app to decide the color of the outline/border with no fill
- 'BadgeCanvas.Appearance'.Ghost- Has no fill nor border
- 'BadgeCanvas.Appearance'.Filled- Uses the theme of the app to decide the fill color
- ThemeColor - The color used to style the border and the fill color of the badge to denote different scenarios. There are several options:
- 'BadgeCanvas.ThemeColor'.Brand
-
'BadgeCanvas.ThemeColor'.Danger
-
'BadgeCanvas.ThemeColor'.Important
-
'BadgeCanvas.ThemeColor'.Informative
- 'BadgeCanvas.ThemeColor'.Severe
-
'BadgeCanvas.ThemeColor'.Subtle
- 'BadgeCanvas.ThemeColor'.Success
- 'BadgeCanvas.ThemeColor'.Warning
Using Badge control
While I haven't used this control yet, I envision using them in pop-ups to visually denote what the pop-up is for e.g. success, warning, etc.
Stay tuned for the remaining modern controls!
To read the official documentation of modern controls, click here.
Recent articles
- Avatar – Everything you want to know about modern control #1
- How to use custom sorting in canvas apps
- How to use Dataverse views to filter related records