Victor Mesquita

Comment

Component

About

A threaded comment component with nested replies, inline editing, reactions slot, and moderation states (hidden, flagged, removed) for discussion UIs.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Comment to your project and fits it to your theme.

Code

How Comment is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import {
  Comment,
  CommentAction,
  CommentActions,
  CommentAuthor,
  CommentAvatar,
  CommentBody,
  CommentHeader,
  CommentReplies,
  CommentTime,
} from "@/components/ui/comment";

import { Reply } from "lucide-react";

export default function CommentDemo() {
  return (
    <div className="w-full max-w-lg p-6">
      <Comment>
        <CommentHeader>
          <CommentAvatar name="Jonas Weber" />
          <CommentAuthor>Jonas Weber</CommentAuthor>
          <CommentTime dateTime="2026-09-29T14:12">2 hours ago</CommentTime>
        </CommentHeader>
        <CommentBody>
          Could we keep the old export format for one more release? Finance
          still imports it by hand.
        </CommentBody>
        <CommentActions>
          <CommentAction>
            <Reply size={13} strokeWidth={1.75} aria-hidden="true" />
            Reply
          </CommentAction>
        </CommentActions>
        <CommentReplies>
          <Comment>
            <CommentHeader>
              <CommentAvatar name="Priya Raman" />
              <CommentAuthor>Priya Raman</CommentAuthor>
              <CommentTime dateTime="2026-09-29T15:40">
                35 minutes ago
              </CommentTime>
            </CommentHeader>
            <CommentBody>
              Yes. I’ll keep both formats behind a setting until November.
            </CommentBody>
            <CommentActions>
              <CommentAction>
                <Reply size={13} strokeWidth={1.75} aria-hidden="true" />
                Reply
              </CommentAction>
            </CommentActions>
          </Comment>
        </CommentReplies>
      </Comment>
    </div>
  );
}

Dependencies

More by Victor Mesquita

View all
  • Data Table Toolbar

    Data Table Toolbar

    10
  • Task List

    Task List

    5
  • Uai Blocks Community Feed

    Uai Blocks Community Feed

    5
  • Reaction Bar

    Reaction Bar

    2
  • Metric Card

    Metric Card

  • Status Banner

    Status Banner

  • Sign-up Card

    Sign-up Card

  • Password Recovery

    Password Recovery