Skip to main content

 

 

 

 

Template:OutSystems/Documentation_KB/Breadcrumb_New_Layout

 

 

Template:OutSystems/OSLanguageSwitcher

 

Applies only to Traditional Web Apps

 

 

OutSystems

Chat Message

Template:OutSystems/Documentation_KB/ContentCollaboration
  • Edit
    Collaborate with us
    Edit this page on GitHub
  • You can use the Chat Message UI Pattern to display conversational posts in notifications or chat screens. It can be used to display content such as photos, text, images, delivery times, and statuses.

    How to use the Chat Message UI Pattern

    For the purposes of this example, our app already contains a form where the user can enter their queries, and once they send their message, it will appear as a conversational post by using the Chat Message widget.

    1. In Service Studio, in the Toolbox, search for Chat Message.

      The Chat Message widget is displayed.

    2. To From the Toolbox, drag the Chat Message widget into the Main Content area of your application's screen.

      By default, the Chat Message widget contains Image, Name, Content, and Actions placeholders.

    3. Add the relevant content to the placeholders.

      • In this example, so that the name the user enters in the form is displayed, we convert the Name placeholder to an expression and enter the relevant logic. To do this, we right-click the Name placeholder, select Convert to Expression, and in the Expression Value pop-up, navigate to the Name attribute, and click Done.

      • So that the message the user enters in the form is displayed, we convert the Content placeholder to an expression and enter the relevant logic. To do this, we repeat the previous step, but this time, navigate to the Message attribute.

    4. You can customize the Chat Message's look and feel by setting the (optional) properties on the Properties tab.

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

    The result of this example looks something like the following:

    Properties

    Property Description
    IsRight (Boolean): Optional If True, the pattern is right aligned. If False, the pattern is left aligned. This is the default value.
    IsInline (Boolean): Optional If False, the chat message is displayed inside a balloon-style box. This is the default value. If True, the chat message does appear inside the balloon-style box.
    Color (Color Identifier): Optional Set the chat message background color. Red, orange, yellow, lime, green, blue, violet, and pink are just some of predefined colors available.

    Examples

    • Blank - The background is a neutral color (Entities.Color.Neutral3). This is the default value.
    • Entities.Color.Red - The background color is red.
    ExtendedClass (Text): Optional Add custom style classes to the Chat Message UI Pattern. You define your custom style classes in your application using CSS.

    Examples

    • Blank - No custom styles are added (default value).
    • "myclass" - Adds the myclass style to the Chat Message UI styles being applied.
    • "myclass1" "myclass2" - Adds the myclass1 and myclass2 styles to the Chat Message UI styles being applied.
    • Was this article helpful?