PHPackages                             mrshanebarron/comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. mrshanebarron/comments

ActiveLibrary[Framework](/categories/framework)

mrshanebarron/comments
======================

Comments/discussion component for Laravel - supports Livewire and Vue

v1.0.1(5mo ago)015MITPHPPHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/comments)[ Packagist](https://packagist.org/packages/mrshanebarron/comments)[ RSS](/packages/mrshanebarron-comments/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Comments
========

[](#comments)

A threaded comments component for Laravel applications. Display and manage user comments with replies, avatars, and timestamps. Works with Livewire and Vue 3.

Installation
------------

[](#installation)

```
composer require mrshanebarron/comments
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### With Replies

[](#with-replies)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`comments`array`[]`Array of comment objects`current-user`string`null`Current user's name`current-user-avatar`string`null`Current user's avatar URL`allow-replies`boolean`true`Enable reply functionalityVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbComments } from './vendor/sb-comments';
app.component('SbComments', SbComments);
```

### Basic Usage

[](#basic-usage-1)

```

import { ref } from 'vue';

const currentUser = { name: 'John Doe', avatar: '/avatars/john.jpg' };
const comments = ref([
  {
    id: '1',
    author: 'Jane Smith',
    avatar: '/avatars/jane.jpg',
    content: 'Great article!',
    timestamp: new Date().toISOString(),
    replies: []
  }
]);

const handleAddComment = (comment) => {
  comments.value.push(comment);
};

const handleAddReply = ({ parentIndex, comment }) => {
  comments.value[parentIndex].replies.push(comment);
};

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`comments`Array`[]`Array of comment objects`currentUser`String`null`Current user's display name`currentUserAvatar`String`null`Current user's avatar URL`allowReplies`Boolean`true`Enable threaded replies### Events

[](#events)

EventPayloadDescription`add-comment``comment`New comment submitted`add-reply``{ parentIndex, comment }`Reply submittedComment Object
--------------

[](#comment-object)

```
{
  id: 'unique-id',
  author: 'User Name',
  avatar: '/path/to/avatar.jpg',
  content: 'Comment text...',
  timestamp: '2024-01-15T10:30:00Z',
  replies: [/* nested comments */]
}
```

Features
--------

[](#features)

- **Threaded Replies**: Nested comment threads
- **Avatars**: User avatars with fallback initials
- **Timestamps**: Relative time display (just now, 5m ago, etc.)
- **Reply Toggle**: Click to reply to specific comments
- **Cancel Reply**: Easy cancel for reply mode

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Rounded avatars
- Indented reply threads
- Border separators
- Hover states

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

### Embed Badge

![Health badge](/badges/mrshanebarron-comments/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-comments/health.svg)](https://phpackages.com/packages/mrshanebarron-comments)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[stancl/tenancy

Automatic multi-tenancy for your Laravel application.

4.3k6.6M40](/packages/stancl-tenancy)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
