Kinetix Comments adds polymorphic, threaded comments to any model — posts, tasks, invoices, anything. Each authenticated user can read and post comments on records they may view, reply one level deep, and edit or delete only their own. A host view policy on the model is honored automatically.
Long threads virtualize automatically
When a thread grows past ~40 top-level comments, the list windows its rows via @tanstack/vue-virtual (only the visible comments render). Shorter threads render in full — no change or overhead. Install the optional peer if you expect long threads: npm install @tanstack/vue-virtual (or php artisan kinetix:install --tanstack).
Mount KinetixComments with the model's morph type and id:
vue
<script setup lang="ts">import KinetixComments from "@/components/kinetix/KinetixComments.vue";</script><template> <KinetixComments commentable-type="App\Models\Post" :commentable-id="post.id" /></template>
It renders a composer, the threaded list (with author avatars/initials and relative timestamps), inline Reply, and Edit / Delete on the user's own comments. The server returns the full tree after each change, so the list stays authoritative. useKinetixComments(type, id) exposes { comments, loading, load, post, edit, remove } for a custom UI. All strings are localized (comment_*, en/es/fr/pt).
Registered under your Kinetix prefix (team-aware when kinetix.teams is on):
Method
Route
Name
GET
{prefix}/comments
kinetix.comments.index
POST
{prefix}/comments
kinetix.comments.store
PUT
{prefix}/comments/{id}
kinetix.comments.update
DELETE
{prefix}/comments/{id}
kinetix.comments.destroy
index / store take commentable_type + commentable_id (and body / parent_id for store); store returns the refreshed tree. Deleting a top-level comment removes its replies too.
Comments
Kinetix Comments adds polymorphic, threaded comments to any model — posts, tasks, invoices, anything. Each authenticated user can read and post comments on records they may view, reply one level deep, and edit or delete only their own. A host
viewpolicy on the model is honored automatically.Long threads virtualize automatically
When a thread grows past ~40 top-level comments, the list windows its rows via
@tanstack/vue-virtual(only the visible comments render). Shorter threads render in full — no change or overhead. Install the optional peer if you expect long threads:npm install @tanstack/vue-virtual(orphp artisan kinetix:install --tanstack).Installation
Enable the feature and declare which models accept comments (their morph type or class) from a service provider — only these can be commented on:
The allowlist keeps the public endpoints from reaching arbitrary records. If you use a morph map, pass either the class or its alias.
The component
Mount
KinetixCommentswith the model's morph type and id:It renders a composer, the threaded list (with author avatars/initials and relative timestamps), inline Reply, and Edit / Delete on the user's own comments. The server returns the full tree after each change, so the list stays authoritative.
useKinetixComments(type, id)exposes{ comments, loading, load, post, edit, remove }for a custom UI. All strings are localized (comment_*, en/es/fr/pt).Authorization
viewability before allowing access.commentable_typethat isn't registered returns 404.Endpoints
Registered under your Kinetix prefix (team-aware when
kinetix.teamsis on):GET{prefix}/commentskinetix.comments.indexPOST{prefix}/commentskinetix.comments.storePUT{prefix}/comments/{id}kinetix.comments.updateDELETE{prefix}/comments/{id}kinetix.comments.destroyindex/storetakecommentable_type+commentable_id(andbody/parent_idforstore);storereturns the refreshed tree. Deleting a top-level comment removes its replies too.