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
| Prop | Type | Default | Description |
|---|---|---|---|
comments | Comment[] | required | All comments. Threading is derived from parentId. |
title | string | "Comments" | Section heading. |
emptyMessage | string | "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
| Event | Payload | Description |
|---|---|---|
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.
