New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

kirschbaum-development/filament-diffs

A Filament plugin that wraps @pierre/diffs to render beautiful file diffs and syntax-highlighted code views.
5,697 12

Larablocks Analysis

Compatibility

Trusted maintainer

kirschbaum-development/filament-diffs works with Laravel 11, 12 and 13 (latest release 1.0.0, Apr 13, 2026).

  • Trusted maintainer: kirschbaum-development publishes 18 packages on Larablocks, with 7,513,965 downloads a month between them.

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Apr 13, 2026)
  • 1,633 downloads a month (needs 10,000)
  • 12 GitHub stars (needs 100)

State

Maintained
  • Last stable release: Apr 13, 2026.
  • 1 release in the last 12 months.
  • First released: Apr 13, 2026.
  • Monthly downloads: 1,633, up 258% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require kirschbaum-development/filament-diffs
Latest Version:1.0.0
PHP:^8.1
Laravel:11 · 12 · 13
License:MIT
Last Updated:Jun 22, 2026
Links: GitHub  ·  Packagist
Maintainer: luisdalmolin

Filament Diffs

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Syntax-highlighted file viewing and visual diff rendering for Filament infolists. Powered by @pierre/diffs.

Components

FileEntry

Renders any text-based content with syntax highlighting. Useful for displaying raw file contents, stored code, API payloads, or any structured text directly in an infolist.

FileEntry component

FileDiffEntry

Renders a side-by-side diff between two versions of content with syntax highlighting. Useful for comparing model versions, reviewing changes, or showing before/after states.

FileDiffEntry component

Requirements

  • PHP 8.1+
  • Filament 3.x, 4.x, or 5.x

Installation

composer require kirschbaum-development/filament-diffs -W

Then register the plugin in your panel provider:

use Kirschbaum\FilamentDiffs\FilamentDiffsPlugin;

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

Usage

FileEntry

Use FileEntry in any infolist to render a field's value with syntax highlighting. The state is resolved from the record attribute matching the entry name:

use Kirschbaum\FilamentDiffs\Infolists\Components\FileEntry;

FileEntry::make('webhook_payload')
    ->label('Webhook Payload')
    ->fileName('payload.json')

You can override the state entirely using a closure:

FileEntry::make('webhook_payload')
    ->label('Webhook Payload')
    ->fileName('payload.json')
    ->state(fn ($record) => $record->getRawPayload())

FileDiffEntry

Use FileDiffEntry to render a side-by-side diff between two strings. Both ->old() and ->new() accept a string or a closure that receives the current record. A null value is treated as an empty string, making it easy to represent newly created files.

use Kirschbaum\FilamentDiffs\Infolists\Components\FileDiffEntry;

FileDiffEntry::make('content')
    ->label('Changes')
    ->fileName('post.md')
    ->old(fn ($record) => $record->previousVersion?->content)
    ->new(fn ($record) => $record->content)

Setting the Language

Both components detect the syntax highlighting language from the file name. You can also set it explicitly using any Shiki language identifier — this takes precedence over file name detection:

FileEntry::make('source')
    ->language('php')

FileDiffEntry::make('content')
    ->old(fn ($record) => $record->previousVersion?->content)
    ->new(fn ($record) => $record->content)
    ->language('markdown')

Passing Options

Both components accept an ->options() array that is passed directly to the underlying @pierre/diffs components, giving you access to the full range of configuration including themes, diff styles, and more:

FileEntry::make('source')
    ->fileName('app.php')
    ->options([
        'theme' => 'github-dark',
    ])

FileDiffEntry::make('content')
    ->old(fn ($record) => $record->previousVersion?->content)
    ->new(fn ($record) => $record->content)
    ->fileName('post.md')
    ->options([
        'diffStyle' => 'unified',
    ])

See the @pierre/diffs documentation for all available options.

Configuration

Default Theme

Publish the config file to set a default theme across all components in your application:

php artisan vendor:publish --tag="filament-diffs-config"
// config/filament-diffs.php
return [
    'default_theme' => null,
];

You can also set a default theme per panel via the plugin, which takes precedence over the config file:

FilamentDiffsPlugin::make()
    ->defaultTheme('github-dark')

Theme Precedence

Themes are resolved in the following order (highest priority first):

  1. Per-component ->options(['theme' => '...'])
  2. Panel plugin FilamentDiffsPlugin::make()->defaultTheme('...')
  3. Config file filament-diffs.default_theme

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

Sponsorship

Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more about us or join us!

License

The MIT License (MIT). Please see License File for more information.

Alternatives to kirschbaum-development/filament-diffs

prodstarter/filament-notification-center

Extend Filament's notification drawer with customizable tabs and notification ca...

90,371 6
hammadzafar05/mobile-bottom-nav

A thumb-friendly mobile bottom navigation bar for Filament panels. It programmat...

93,913 20
harvirsidhu/filament-action-overflow

Compose any Filament action list into primary actions plus an overflow dropdown,...

13,285 8
aureuserp/progress-stepper

A Filament v5 progress-stepper form & infolist component for visualising workflo...

13,205 6
akunbeben/fluid-actions

Inline confirmation for Filament Actions

8,064 11

Version History

Version Released PHP License
1.0.0 ^8.1 MIT