X Enterprises
nuxt-x-affiliate

Comment List

Threaded comment list with avatar, metadata, and reply / upvote actions.

Comment List

The XAFCommentList component renders a list of threaded comments — top-level comments with nested replies, author + avatar, date, optional upvotes, and reply / upvote action buttons. Pair with <XAFCommentForm> for the input UI.

Components

<XAFCommentList />

<XAFCommentList
  :comments="comments"
  title="Reader comments"
  @reply="onReply"
  @upvote="onUpvote"
/>

Props

PropTypeDefaultDescription
commentsComment[]requiredAll comments. Threading is derived from parentId.
titlestring"Comments"Section heading.
emptyMessagestring"Be the first to comment."Shown when the list is empty.

Comment shape

interface Comment {
  id: string
  author: string
  avatar?: string
  text: string
  date: string  // ISO
  parentId?: string
  replyCount?: number
  upvotes?: number
}

Events

EventPayloadDescription
reply{ parentId, text }Fired when the reader clicks Reply.
upvote{ id }Fired when the reader clicks 👍.

AI Context

component: XAFCommentList
package: "@xenterprises/nuxt-x-affiliate"
use-when: Threaded comment list with avatar, metadata, reply / upvote actions. Pair with XAFCommentForm for input.
Copyright © 2026