CommentThread
v1.0.11Updated 27 Aug 2026Threaded discussion component — nested replies, reactions, role badges, rich-text bodies and score/sort controls for internal comment feeds.
Preview
Live · 10 stories▸Why this is recommendedcommentsthreadredditdiscussion+6
The default, out-of-the-box CommentThread.
- ✓Pulse discussion threads
- ✓Casebook ticket conversations
- ✓document review comments
- ✓community/forum pages
- Nested reply tree with Reddit-style collapse rails and collapsed summary rows
- Up/down voting with optimistic local score and aria-pressed state
- Inline reply + edit composers built on RichTextEditor; async submit with pending state
- Sort by Best / Top / New / Old (pinned comments always first)
- Pinned, [deleted] and [removed by moderator] states
- Emoji reaction chips with reacted state, counts, and an add-reaction picker
- @mention highlighting with onMentionClick (event-delegated, DOMPurify-sanitized bodies)
- Load more replies (async spinner) and Continue-thread past maxDepth
- Locked-thread banner that disables all composers
- Own-comment Edit / Delete (Popconfirm) via a per-comment menu; Report for others
- Read-only mode when currentUser is omitted
- i18n: every built-in string overridable via the labels prop (CommentThreadLabels); relative/absolute timestamps and all counts follow LocaleProvider (Intl-driven, Buddhist-calendar aware, no bundled locale data)
- ✕Real-time chat (use Chat)
- ✕Flat activity feeds (use Timeline)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
commentsControlled tree: id, author, body (HTML), createdAt, score, children, pinned, deleted, reactions, moreCount
—defaultCommentsUncontrolled mode: the thread manages its own tree; all mutations work with zero wiring
—reactionPresetEmoji offered by the add-reaction picker
—currentUserEnables composers and own-comment edit/delete; omit for read-only
—sortControlled sort (defaultSort for uncontrolled)
—lockedLocked banner; disables replying
—maxDepthNesting depth before "Continue this thread" (default 6)
—onVoteVote changes (0 = retracted)
—onReplyNew comment; parentId null = top level
—onEditSave an edited comment
—onDeleteConfirmed via Popconfirm
—onLoadMoreFetch the moreCount replies of a node
—onReactToggle a reaction chip
—onMentionClickClick/Enter on an @mention
—labelsOverride any built-in UI string (i18n); merged over English defaults (DEFAULT_COMMENT_THREAD_LABELS)
—