Skip to main content
Key Benefit: Foster dynamic community engagement with comprehensive comment systems, emoji reactions, and real-time interaction features that encourage meaningful conversations and content discovery.

Feature Overview

The Comments & Reactions UIKit provides comprehensive tools for building engaging comment systems and reaction features. From threaded conversations and reply management to emoji reactions and user interaction tracking, these components create the foundation for vibrant community discussions and content engagement.

Comment Systems

Rich Conversations
  • Threaded comment displays
  • Comment creation and editing
  • Reply management
  • Mention support in comments

Reaction Features

Expressive Engagement
  • Emoji reaction systems
  • Reaction list displays
  • Real-time reaction updates
  • Custom reaction support

Interactive Components

Community Engagement
  • Comment tray interfaces
  • Reaction picker components
  • User interaction tracking
  • Brand user comment support

Content Management

Moderation Tools
  • Comment reporting
  • Content moderation
  • User blocking capabilities
  • Administrative controls

Platform Support

FeatureiOSAndroidReactReact NativeFlutter
Create / Edit Comment
View Comments
Report Comment
Mention in Comments
Comment Tray
Brand User Comment
Comment Ads
Multi-Level Comment Replies (2-Level)
Post / Comment / Story Reactions
View Reactions
Multiple Reactions
Legend: ✅ Full Support | ❌ Not Available

Component Features

Interactive Comment Systems
  • Threaded Comments: Nested reply conversations with two-level display model
  • Comment Creation: Rich text editing with mention support
  • Comment Management: Edit, delete, and report capabilities
  • Real-time Updates: Live comment synchronization
Expressive User Engagement
  • Emoji Reactions: Pre-defined and custom emoji support
  • Reaction Analytics: User lists and engagement metrics
  • Multiple Reactions: Support for various reaction types
  • Real-time Updates: Instant reaction synchronization
Multi-Level Comment Reply System
  • Reply to any bubble: Users can reply to L0 comments, L1 replies, or L2 replies
  • Expand & Load More: “View replies (n)” button to expand reply threads, “View more replies” for pagination (5 replies per page)
  • Inline Edit: Edit L1/L2 replies directly within the comment bubble
  • Per-Level Deletion: Soft-deleted L0 comments show placeholder; deleted L1/L2 replies are silently removed
  • Notification Deep-Link: Tapping a reply notification navigates to the post and display the specific reply
Enhanced Functionality
  • Mention System: @username functionality with notifications
  • Content Moderation: Reporting and administrative controls
  • Brand User Support: Professional commenting capabilities
  • Accessibility: Screen reader and keyboard navigation support

Multi-Level Comment Replies

The UIKit comment system supports a two-level display model for replies, enabling richer conversations while keeping the UI clean.
Comment sheet overlay showing top-level comments with reply and reaction options

Comment Hierarchy

LevelDisplayReply Action
Level 0 (L0)Top-level comment on a post/story”Reply” creates an L1 reply
Level 1 (L1)Direct reply to L0, indented under the parent”Reply” creates an L2 reply
Level 2 (L2)Reply to an L1 comment, indented under L1”Reply” creates another L2 reply (auto-resolved to L1 ancestor)
Comment sheet showing L0, L1, and L2 reply hierarchy with View replies button
UIKit supports up to Level 2 only. All replies beyond Level 1 are always displayed as Level 2. When a user taps “Reply” on an L2 comment, the UIKit automatically resolves the parentId to the L1 ancestor, so the new reply is created as another L2 sibling — never L3 or deeper.
When a user taps “Reply” on an L2 reply, the compose bar shows “Replying to @[author-name]” and pre-fills the text with @[author-name]. The reply is created under the L1 ancestor, not the L2 comment itself.

Reply Thread Behavior

Paginated reply threads with progressive loading
Post detail showing expanded reply threads with L1 and L2 replies and View more replies button
  • When an L0 comment has replies, a “View replies (n)” button appears below it
  • Tapping it loads the first page of replies (5 per batch)
  • If more replies exist, a “View more replies” button appears at the end of the thread
  • L1 replies are sorted newest first (lastCreated)
  • L2 replies are sorted oldest first (firstCreated) for chronological reading
Contextual compose bar for replies
Reply compose bar showing Replying to banner with text input
  • Tapping “Reply” on any comment bubble opens the compose bar with focus
  • A “Replying to @[author]” chip appears above the text field
  • The text field is pre-filled with @[author-name]
  • Tapping the dismiss button on the chip clears the reply context
  • Reply action is hidden for non-member users in communities (shouldAllowCreation = false)
Level-specific deletion rules
  • L0 soft delete: Comment shows a placeholder (“This comment has been deleted”) — child replies remain visible
  • L1 delete: Reply bubble is removed from the UI; L0 parent’s reply count decrements
  • L2 delete: Only the L2 bubble is removed; L1 parent and sibling L2 replies remain
Edit replies directly within the bubble
  • The bubble transforms into an editable text field with Cancel and Save buttons
  • Save is disabled if text is empty or unchanged
Deep-link from notification tray to specific replies
  • Tapping a reply notification navigates to the post detail page
  • The screen displays the specific reply bubble with a brief highlight animation
Post detail page showing expanded multi-level comment replies with L0, L1, L2 threading and View more replies

Limitations

  • UIKit supports up to Level 2 replies. All replies beyond Level 1 are always created and displayed as Level 2 — the UIKit never creates L3 or deeper comments.
  • Reply threads load 5 replies per page by default. This is not configurable through UIKit.

Implementation Guide

Comprehensive comment interface with threading and reactionsThe Comment Tray Component facilitates dynamic interaction through comments and reactions, designed to foster community engagement directly within content viewing experiences.

Features

FeatureDescription
View, create or edit commentsUsers can view, create or edit text comments or reply comments, and add reactions to comments
Multi-level repliesReply to any comment or reply (L0, L1, L2) with “Replying to” chip and @mention pre-fill
Expand reply threads”View replies (n)” button to expand reply threads with paginated loading (5 per batch)
Inline editEdit L1/L2 replies directly within the comment bubble with Cancel/Save actions
Per-level deletionSoft-deleted L0 shows placeholder; deleted L1/L2 replies are silently removed
Threaded conversationsSupport for nested replies with a two-level display model
Real-time updatesLive synchronization of comments and reactions

Customization Options

Config IDTypeDescription
*/edit_comment_component/*ComponentYou can customize theme
*/edit_comment_component/cancel_buttonElementYou can customize button_text, icon and background_color
*/edit_comment_component/save_buttonElementYou can customize button_text, icon and background_color
*/comment_tray_component/*ComponentYou can customize close_icon

Code Examples

// If you want to load comments of a post:
//     referenceId: "<post-id>"
//     referenceType: .post
// If you want to load comments of a story:
//     referenceId: "<story-id>"
//     referenceType: .story
let commentTrayComponent = AmityCommentTrayComponent(
    referenceId: "<story-id>", 
    referenceType: .story, 
    community: nil, 
    shouldAllowInteraction: true, 
    shouldAllowCreation: true
)
let viewController = AmitySwiftUIHostingController(rootView: commentTrayComponent)
Custom navigation behavior can be implemented to enhance or modify the interaction flow on the AmityCommentTrayComponent.
class CustomAmityCommentTrayComponentBehavior: AmityCommentTrayComponentBehavior {
    override init() {
        super.init()
    }
}

// Call this function to setup custom behaviour class in UIKit
func setCommentTrayBehaviour() {
    let customBehavior = CustomAmityCommentTrayComponentBehavior()
    AmityUIKit4Manager.behaviour.commentTrayComponentBehavior = customBehavior
}

Component Management Strategies

Creating engaging conversation experiencesDesign comment systems that encourage meaningful dialogue while maintaining community standards. Implement clear threading, easy reply mechanisms, and intuitive editing capabilities. Consider moderation needs and user reporting flows early in design.
Optimizing reaction engagementChoose reaction sets that match your community culture and content types. Implement clear visual feedback for user interactions and consider analytics to understand engagement patterns. Balance expressiveness with simplicity.

Best Practices

Creating intuitive comment experiencesDesign comment interfaces that encourage meaningful conversations while maintaining readability. Implement clear visual hierarchy for threaded discussions, provide easy access to reply and edit functions, and ensure comment moderation tools are readily available to maintain community standards.
Optimizing reaction engagementChoose reaction sets that match your community culture and content types. Implement clear visual feedback for user interactions, consider analytics to understand engagement patterns, and balance expressiveness with simplicity to avoid overwhelming users.

Posts & Media

Explore post components that integrate with comment and reaction systems.

Social Feeds

Learn about feed components that display posts with comment and reaction previews.

Users & Profiles

Understand user profile features that showcase comment and reaction activity.

Communities

Discover community features that provide context for comments and reactions.
Implementation Strategy: Start with AmityCommentTrayComponent for comprehensive comment functionality, then add AmityReactionListComponent for detailed user engagement insights. Integrate reaction features gradually based on your community engagement goals and user feedback patterns.