Skip to content
Uxelith
Prov1.0.0App screens

Comment Thread

Replies, emoji reactions, @mentions with suggestions, who is typing, comments that show the moment they are sent, and a thread you can resolve. Works with any server.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
5 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import { CommentThread } from "@/components/comment-thread"

export function Discussion() {
  return (
    <CommentThread
      me={{ name: "Sofia Rossi" }}
      people={[{ name: "Emily Carter", detail: "Product" }]}
      anchor="On Q3 launch plan"
      defaultComments={[
        { id: "1", author: "Emily Carter", body: "Can we move the launch to the 14th?", at: "2026-11-05T09:30:00Z" },
      ]}
      onSend={async (body, replyTo) => {
        await fetch("/api/comments", { method: "POST", body: JSON.stringify({ body, replyTo }) })
      }}
    />
  )
}

Props

PropTypeDefaultDescription
comments / defaultCommentsThreadComment[][]The thread, kept by you or by the component. Each has id, author, body, at, and optionally avatar, reactions, replies, pending.
onCommentsChange(comments) => void—Called with the new thread after any change.
me{ name, avatar? }—You: new comments are written as this person.
people{ name, detail?, avatar? }[][]Who can be mentioned with @.
onSend(body, replyTo) => void | Promise<void>—A new comment shows at once as Sending…; resolve to confirm it, or throw to take it back and restore the text.
onReact(id, emoji, on) => void—Called when you add or remove a reaction.
resolved / defaultResolvedbooleanfalseWhether the thread is resolved.
onResolvedChange(resolved) => void—Called when it is resolved or reopened.
anchorReactNode—What the thread is about, shown in its header.
typingstring[][]Names of people typing right now.
emojisstring[]six common reactionsThe reactions offered in the picker.
labelstring"Comments"Accessible name of the thread.
placeholderstring"Reply… type @ to mention someone"Text in the empty box.

Accessibility

  • The composer sends on Enter and Shift+Enter makes a new line.
  • Typing @ opens a list of people: arrow keys choose, Enter or Tab picks, Escape closes.
  • Reactions are toggle buttons that say their count; the picker works with the arrow keys and Escape.
  • Sending, replies, reactions and resolving are announced to screen readers.
  • Motion stops under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in App screens

All 8 in App screens
  • App screensPro

    Dashboard Shell

    An application frame: a sidebar that folds to an icon rail, a search that grows into a ⌘K command palette, stats with sparklines, a dense revenue chart with a 7/30/90-day range and recent orders with status badges.

  • App screensPro

    File Manager

    A file manager for your own storage: lasso and multi-select, drag to folders or the Trash, right-click menus, rename in place, Quick Look, Undo and uploads with progress, all by keyboard and touch too.

  • App screensPro

    Mobile App Shell

    The frame of a phone app: a bottom tab bar, a large title that moves into the top bar, screens that slide in with swipe-back, a menu that closes when you pick an item, and a sidebar on wide screens. Each tab keeps its own screens and scroll.