PHPackages                             mrshanebarron/notifications - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. mrshanebarron/notifications

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

mrshanebarron/notifications
===========================

Toast notifications component for Laravel - supports Livewire and Vue

v1.0.1(5mo ago)09MITBladePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

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

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

Notifications
=============

[](#notifications)

A toast notification component for Laravel applications. Display success, error, warning, and info messages. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/notifications
```

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

[](#livewire-usage)

### Basic Setup

[](#basic-setup)

```

```

### Triggering Notifications

[](#triggering-notifications)

```
// In your Livewire component
$this->dispatch('notify', [
    'message' => 'Item saved successfully!',
    'type' => 'success'
]);

$this->dispatch('notify', [
    'message' => 'Something went wrong',
    'type' => 'error',
    'title' => 'Error'
]);
```

### Position Options

[](#position-options)

```

```

### Custom Duration

[](#custom-duration)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`position`string`'top-right'`Screen position`duration`number`5000`Auto-dismiss time (ms)Vue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

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

### Basic Usage

[](#basic-usage)

```

    Success
    Error

import { ref } from 'vue';

const notifications = ref(null);

const showSuccess = () => {
  notifications.value.add('Item saved successfully!', 'success');
};

const showError = () => {
  notifications.value.add('Something went wrong', 'error', 'Error');
};

```

### Notification Types

[](#notification-types)

```

// Success (green)
notifications.value.add('Saved!', 'success');

// Error (red)
notifications.value.add('Failed!', 'error');

// Warning (yellow)
notifications.value.add('Check this', 'warning');

// Info (blue)
notifications.value.add('FYI', 'info');

```

### With Title

[](#with-title)

```

notifications.value.add(
  'Your changes have been saved.',
  'success',
  'Success!'  // Optional title
);

```

### Position Options

[](#position-options-1)

```

```

### Custom Duration

[](#custom-duration-1)

```

```

### Global Notification Service

[](#global-notification-service)

```
// notifications.js - Create a global service
import { ref } from 'vue';

const notificationRef = ref(null);

export const notify = {
  setRef: (ref) => { notificationRef.value = ref; },
  success: (msg, title) => notificationRef.value?.add(msg, 'success', title),
  error: (msg, title) => notificationRef.value?.add(msg, 'error', title),
  warning: (msg, title) => notificationRef.value?.add(msg, 'warning', title),
  info: (msg, title) => notificationRef.value?.add(msg, 'info', title)
};

// App.vue

import { ref, onMounted } from 'vue';
import { notify } from './notifications';

const notificationsRef = ref(null);
onMounted(() => notify.setRef(notificationsRef.value));

// Any component
import { notify } from './notifications';
notify.success('Item saved!');
```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`position`String`'top-right'`Screen position`duration`Number`5000`Auto-dismiss milliseconds### Methods

[](#methods)

MethodParametersDescription`add``(message, type, title?)`Add a notification`remove``(id)`Remove by IDNotification Types
------------------

[](#notification-types-1)

TypeColorIcon`success`GreenCheckmark`error`RedX`warning`YellowWarning triangle`info`BlueInfo circlePositions
---------

[](#positions)

PositionLocation`top-right`Top right corner`top-left`Top left corner`bottom-right`Bottom right corner`bottom-left`Bottom left corner`top-center`Top center`bottom-center`Bottom centerFeatures
--------

[](#features)

- **Multiple Types**: Success, error, warning, info
- **Auto-dismiss**: Configurable duration
- **Manual Close**: Click X to dismiss
- **Stacking**: Multiple notifications stack
- **Animations**: Smooth slide-in/out
- **Positioning**: 6 position options

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Colored left border
- Type-specific background colors
- Type-specific icons
- Shadow effect
- Rounded corners

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

[](#requirements)

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

License
-------

[](#license)

MIT License

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance73

Regular maintenance activity

Popularity4

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)

---

Tags

laravelnotificationslivewirealertsvuetoast

### Embed Badge

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

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

###  Alternatives

[ascsoftw/livewire-toast

Livewire Package to display Toast Notifications

48544.2k1](/packages/ascsoftw-livewire-toast)[arcanedev/notify

Flexible flash notifications helper for Laravel.

139.5k1](/packages/arcanedev-notify)

PHPackages © 2026

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