Skip to main content




Applies only to Mobile Apps and Reactive Web Apps
Service Studio version:

Icon Badge

  • Edit
    Collaborate with us
    Edit this page on GitHub
  • You can use the Icon Badge UI Pattern to display numerical information as a notification. For example, the Icon Badge UI pattern is frequently used to notify users about the number of unread emails, unopened messages, or new tasks they may have.

    How to use the Icon Badge UI Pattern

    The following example demonstrates how you can display the number of registered users on your platform.

    1. In Service Studio, in the Toolbox, search for Icon Badge.

      The Icon Badge widget is displayed.

      If the UI widget does not display, it may be because you used a ready-made app, which deletes unused widgets from the module. To make additional widgets available in your app:

      a. Go to Module > Manage dependencies.

      b. Search for and select the relevant Producer, for example OutSystemsUI. Ensure Show All is selected.

      c. On the Public elements for the selected Producer displayed on the right, ensure Show All is selected.

      d. Search for and select the element you want to add, and click Apply.

      e. In Service Studio, in the Toolbox, search for the widget again.

    2. From the Toolbox, drag the Icon Badge widget into the Main Content area of your application's screen.

      By default, the Icon Badge contains an Icon placeholder with a pre existing icon.

    3. To create an aggregate (in this example to retrieve all the users on the platform), right-click the screen name and select Fetch Data from Database.

    4. To add a database entity, click the screen, and from the Select Source pop-up, select the relevant entity and click OK. In this example, we select the User entity.

      The aggregate GetUsers is created.

    5. To reopen your screen, select the Interface tab, and double-click on your screen name.

    6. Select the Icon Badge widget, and on the Properties tab, from the Number drop-down, select Expression Editor, and in the Expression Editor enter the following expression and click Done.


      The Number property is now set to display the Count property of the Aggregate you created earlier, which gets and displays the number of users on your platform.

    7. On the Properties tab, you can customize the Icon Badge's look and feel by setting any of the optional properties, for example, the color.

    After following these steps and publishing the module, you can test the pattern in your app.


    Property Description
    Number (Integer): Mandatory The number that appears inside the badge. Set this to a data source that contains the value you want to display.


    • VariableName - Displays the value that the variable "VariableName" holds at that time.
    • ExampleAggregate.Name - Displays the names contained in the records returned by the "ExampleAggregate" aggregate execution.
    Color (Color Identifier): Optional Set the icon badge's background color. Red, orange, yellow, lime, green, blue, violet, and pink are just some of predefined colors available for the icon badge.


    • Blank - Displays the icon badge in the color you chose when creating the app. This is the default.
    • Entities.Color.Red - Displays a red icon badge.
    IsLight (Boolean): Optional Specify the badge's background and text color.


    • True - A brighter hue of the color is applied to the badge and a darker color to the text.
    • False - A darker hue of the color is applied to the badge and a lighter color to the text. This is the default.
    ExtendedClass (Text):Optional Adds custom style classes to the Pattern.You define your custom style classes in your application using CSS.


    • Blank - No custom styles are added (default value).
    • "myclass" - Adds the myclass style to the UI styles being applied.
    • "myclass1 myclass2" - Adds the myclass1 and myclass2 styles to the UI styles being applied.
    You can also use the classes available on the OutSystems UI. For more information, see the OutSystems UI Live Style Guide.
    • Was this article helpful?