Comments & Conversations ΒΆ

Styles and JS widgets to use for comments and conversations.

JS comments

2000 characters remaining
Please log in or sign up to add comments.

Styles & read-only server-side use

The comment styles are not included by default. If you need to add comments to a page, please import the necessary Sass block from your application stylesheet:

@import "bem-blocks/comments"

To display a thread of comments with these styles, please use the comments helper. Simply set up an array in the following format:

[
  # Object for each comment
  {
    name: 'String',
    profile_id: 'String',
    date: Date,
    message: 'String',
    replies: Array # array of comments
  }
]

The replies array should be in the same format.

Pass this array to the comments helper in your view:

= comments comments_array