PHPackages                             notebrainslab/filament-email-templates - 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. notebrainslab/filament-email-templates

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

notebrainslab/filament-email-templates
======================================

A powerful and flexible Email Template Management plugin for Filament v4 and v5.

1.0.0(2mo ago)61552[1 issues](https://github.com/notebrainslab/filament-email-templates/issues)MITPHPPHP ^8.2

Since Mar 3Pushed 2mo agoCompare

[ Source](https://github.com/notebrainslab/filament-email-templates)[ Packagist](https://packagist.org/packages/notebrainslab/filament-email-templates)[ Docs](https://github.com/notebrainslab/filament-email-templates)[ RSS](/packages/notebrainslab-filament-email-templates/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (2)Used By (0)

Filament Email Templates Designer
=================================

[](#filament-email-templates-designer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c23924adedcee4bb5d3e1a041fb9f26aae0aedfd332fdca48d7e4da98118bfd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f7465627261696e736c61622f66696c616d656e742d656d61696c2d74656d706c617465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/notebrainslab/filament-email-templates)[![License](https://camo.githubusercontent.com/3d3de83552ce2452ed89f8500c5b5dbda202114bf8abb93d9236ce5568030946/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e6f7465627261696e736c61622f66696c616d656e742d656d61696c2d74656d706c617465732e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHP](https://camo.githubusercontent.com/7cb6e51c03bd8f9bac7dad425741162bd74d0ce060270964054394ffad785eca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75653f7374796c653d666c61742d737175617265)](https://php.net)[![Filament](https://camo.githubusercontent.com/d48fde63e25bff03d6f6303b17c6ec1444bcde7c7957efd98c727268e4ac825e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d763425323025374325323076352d6f72616e67653f7374796c653d666c61742d737175617265)](https://filamentphp.com)

A sleek, powerful, and professional visual email designer for **Filament v4 and v5**. Build beautiful, pixel-perfect responsive email layouts using an integrated [Unlayer](https://unlayer.com) drag-and-drop editor and integrate them into your own Laravel Mailables with ease.

---

✨ Features
----------

[](#-features)

- 🎨 **Visual Drag-and-Drop Editor** — Integrated Unlayer editor for professional design without writing HTML/CSS.
- 🌙 **Dark Mode Support** — Fully reactive dark/light theme that syncs with your Filament panel's theme toggle in real time.
- 🏷️ **Smart Merge Tags** — Dynamic variable support (e.g., `{{user_name}}`) with robust injection logic for both the subject and body.
- 🧩 **Mailable Integration** — Use the `HasEmailTemplate` trait to power any standard Laravel Mailable from your visual templates.
- 📂 **Key-Based Management** — Organize your library with unique programmatic keys (e.g. `auth.welcome`, `order.failed`).
- 🛡️ **Resilient Rendering** — Automatic HTML cleanup and formatting to ensure designs look great in all mail clients.
- 🧭 **Fully Configurable Navigation** — Customize the navigation group, icon, sort order, and badge visibility from your Panel Provider.
- 🧹 **Clean Architecture** — Design-first, no magic event listeners or forced overrides.

---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require notebrainslab/filament-email-templates
```

Run the install command to publish migrations and config:

```
php artisan filament-email-templates:install
```

Run the migrations if you didn’t execute them during installation:

```
php artisan migrate
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Register the Plugin

[](#1-register-the-plugin)

Add the plugin to your Filament Panel Provider (e.g. `app/Providers/Filament/AdminPanelProvider.php`):

```
use NoteBrainsLab\FilamentEmailTemplates\FilamentEmailTemplatesPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentEmailTemplatesPlugin::make(),
        ]);
}
```

### 2. Plugin Options

[](#2-plugin-options)

All options are optional — the plugin works out of the box with sensible defaults.

```
FilamentEmailTemplatesPlugin::make()
    ->navigationGroup('Content') // Default: 'Email Templates'
    ->navigationIcon('heroicon-o-envelope-open') // Default: heroicon-o-envelope-open
    ->navigationSort(5) // Default: 1
    ->navigationBadge(true), // Default: true — shows template count badge
```

MethodTypeDefaultDescription`navigationGroup(string)``string``'Email Templates'`The sidebar group label`navigationIcon(string)``string``heroicon-o-envelope-open`Heroicon name for the nav item`navigationSort(int)``int``1`Sort order within the nav group`navigationBadge(bool)``bool``true`Show or hide the record-count badge### 3. Unlayer Project ID (Recommended)

[](#3-unlayer-project-id-recommended)

To enable the **Dark Theme** and **Image Uploads** in the Unlayer editor, you must set a valid Unlayer Project ID. Without it, the editor runs in anonymous demo mode and custom appearances are disabled.

1. Create a free account at [unlayer.com](https://unlayer.com) and create a Project.
2. Copy the **Project ID** from your project settings page.
3. Add it to your `.env`:

```
UNLAYER_PROJECT_ID=YOUR_PROJECT_ID
```

> **Note:** The editor works perfectly for designing and saving templates even without a Project ID. The only feature you’ll miss is dark mode. That said, it’s better to create a free developer account and use your own Project ID to ensure everything is properly configured and ready for long-term use.

---

💡 Usage
-------

[](#-usage)

### 1. Design Your Template

[](#1-design-your-template)

Navigate to **Email Templates** in your Filament panel and click **New Email Template**.

- **Name** — Internal human-readable label.
- **Template Key** — A unique programmatic identifier (e.g., `order.success`, `auth.welcome`). This is what you'll reference in your Mailables.
- **Subject** — The email subject line. Blade syntax and `{{placeholders}}` are both supported.
- **Design** — Use the full-featured Unlayer drag-and-drop editor to build your layout. Merge tags are available in the editor toolbar.

### 2. Use in a Laravel Mailable

[](#2-use-in-a-laravel-mailable)

Add the `HasEmailTemplate` trait to any standard Laravel Mailable:

```
namespace App\Mail;

use Illuminate\Mail\Mailable;
use NoteBrainsLab\FilamentEmailTemplates\Traits\HasEmailTemplate;

class OrderConfirmation extends Mailable
{
    use HasEmailTemplate;

    public function __construct(public $order)
    {
        // Reference the 'key' you set in the Filament panel
        $this->templateKey = 'order.success';

        // Pass the variables your design uses as {{placeholders}}
        $this->templateVariables = [
            'user_name'   => $this->order->customer_name,
            'order_total' => $this->order->total,
        ];
    }
}
```

Then send it as any standard Mailable:

```
Mail::to($user)->send(new OrderConfirmation($order));
```

### 3. Using Placeholders

[](#3-using-placeholders)

In the Unlayer editor, add `{{variable_name}}` placeholders as text anywhere in your design. The trait will replace them safely at send time.

```
Hello {{user_name}}, your order of ${{order_total}} has been confirmed!

```

The subject line also supports placeholders and full Blade syntax:

```
Your Order #{{order_total}} is Confirmed — Thanks {{user_name}}!

```

---

🌙 Dark Mode
-----------

[](#-dark-mode)

The Unlayer editor fully syncs with Filament's dark mode toggle:

- The **editor chrome** (toolbars, panels, dropdowns) switches between `modern_dark` and `modern_light` themes.
- The **canvas background** updates between `#161616` (dark) and `#f9f9f9` (light) dynamically.
- Both the initial page load and runtime theme toggles are handled automatically — no page refresh needed.

> Dark mode requires a valid `UNLAYER_PROJECT_ID` to work.

---

📋 Requirements
--------------

[](#-requirements)

DependencyVersionPHP`^8.2`Laravel`^11.0` or `^12.0`Filament`^4.0` or `^5.0`---

📄 License
---------

[](#-license)

The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance83

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/336243bce605eb938861f29d74d64abc055a00b45071b9ceadf20aa1c209c3b3?d=identicon)[shovan-notebrains](/maintainers/shovan-notebrains)

---

Top Contributors

[![shovann-notebrains](https://avatars.githubusercontent.com/u/153203151?v=4)](https://github.com/shovann-notebrains "shovann-notebrains (16 commits)")

---

Tags

laravelemaileventstemplatesfilamentfilament-plugin

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/notebrainslab-filament-email-templates/health.svg)

```
[![Health](https://phpackages.com/badges/notebrainslab-filament-email-templates/health.svg)](https://phpackages.com/packages/notebrainslab-filament-email-templates)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ramnzys/filament-email-log

This package provides a Filament resource to view all Laravel outgoing emails.

5211.3k](/packages/ramnzys-filament-email-log)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7565.0k4](/packages/guava-filament-modal-relation-managers)

PHPackages © 2026

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