ThatDesignUIOriginalInteractive preview
Comment thread with mentions
A doc comment thread with folded replies, toggleable emoji reactions, edit and delete with undo, resolve and reopen, and a composer with @mention autocomplete.
- Category
- Collaboration
- Platform
- Responsive
Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Default state
Use this component
Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.
FreeReact 18+Tailwind v3.4 or v4No extra packages
1. Add it with the shadcn CLI
npx shadcn@latest add https://www.thatdesignui.com/r/comment-thread.json2. Use it
Every prop is optionalapp/page.tsx
import CommentThread from "@/components/comment-thread";
export default function Page() {
return <CommentThread />;
}Prefer to paste it yourself? Open the .
Under the hood
How it’s built
What’s inside
- A 34rem white card (22px radius): a header quoting the commented text with a Resolve button, then a root comment and replies joined by a thin vertical line through 32px initials avatars.
- Older replies fold behind 'Show 2 more replies' with stacked avatar dots; @mentions render as indigo chips; reactions are rounded pills with counts, indigo when you reacted, plus a dashed add-reaction button that reveals four emoji.
- The composer sits on a light gray footer: a growing textarea, an indigo send button and a 'Ctrl + Enter to send' hint; typing @ opens a small people menu above it.
How it behaves
- Clicking a reaction pill toggles your reaction and its count changes by one.
- Typing @ma shows matching people; Arrow keys move and Enter inserts '@Mateo Rossi'.
- Deleting your own reply shows 'Reply deleted' with Undo, which restores it in place.
- Resolve collapses the thread to a one-line summary and turns the border green.



