Comment

A chat tool that enables interaction among real-time users, without the need to install an external chatbot. Helps in community building, customer support, etc.

Basic

Title

Enter the text to be shown as the title at the top of the chat box. It is recommended to keep this string short and contextual.

Data

Comment List Data

Provide the data or the source for loading the content of the widget. This is technically the list of comments and other details for the entries. It can be fetched using a query from a data source.

[
  {
    "user": {
      "name": "Li Lei",
      "avatar": "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
    },
    "value": "What is the use of this component?",
    "createdAt": "2023-06-15T08:40:41.658Z"
  },
  {
    "user": {
      "name": "mou"
    },
    "value": "This component allows you to post or delete comments, as well as mention people who appear in the chat.",
    "createdAt": "2023-06-16T08:43:42.658Z"
  },
  {
    "user": {
      "name": "Han Meimei",
      "displayName": "Han"
    },
    "value": "I want to give it a try",
    "createdAt": "2023-06-17T08:49:01.658Z"
  },
  {
    "user": {
      "name": "mou"
    },
    "value": "Enter the content in the input box below and press shift+enter to send it immediately",
    "createdAt": "2023-06-18T08:50:11.658Z"
  }
]
PropertyDescription

user

name

The name of the user who posted the comment

avatar

The URL to the profile picture of the user

value

The actual comment text submitted

createdAt

The timestamp value when the comment was posted

User Info

Mention the basic information about the user account that is to be used to post the comment. This content can be fetched using a query.

PropertyDescription

name

The text to be shown as the name of the user

email

The email address of the account by which the comment is to be posted

Mention List Data

Enter the JSON data that contains the users to be displayed as a list when the key '@' is pressed to tag someone. This data contains the list of hashtags shown when the user presses the '#' key.

{
  "@": [
    "Li Lei",
    "Han Meimei"
  ],
  "#": [
    "friends",
    "family",
    "lifestyle",
    "happybirthday",
    "enjoyed",
    "poor",
    "fun"
  ]
}

Interaction

Event Handlers

EventDescription

Click

Submit

Delete

Mention

Hide

This sets whether the widget has to be displayed on the screen when the program is loaded. This shows/hides the widget both on desktop and mobile devices.

Allowing Comments

Enables the comment box where the user can enter and submit the comments. This will be helpful if the admin needs to abstain from specific users from submitting posts.

Show Delete Button

Displays the delete option button at the end of each comment. Allows the users to redo their submit action, or remove unwanted posts.

Layout

Button Title

This is the text displayed on the submit button. Users will click this button to post their comments after typing.

Placeholder

Specifies a hint that describes the expected value. The placeholder shows the hint text in the widget when nothing is selected or entered. This text disappears as soon as a value is entered in the control.

Style

PropertyDescription

Background

Users can change the colour of the text background using this property. It has all the RGB colour ranges to pick from. It is recommended to use a corresponding background colour that shows the font clearly.

Mention Background

Set the background for the posts the user is tagged or mentioned. This helps the user to identify the posts easily.

Text

Set the colour of the text used to show comments. Recommended to set in contrast with the background.

Margin

This value is set in terms of "px" number which creates the space between the border and the content of the widget.

Padding

This value is set in terms of "px" number which creates the space between the border and outer elements.

Border Radius

This sets the radius of the widget's corners, enabling rounded corners on the widget. This value is defined in "px" terms.

Last updated