PHPackages                             cocosmos/filament-sticky-save-bar - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cocosmos/filament-sticky-save-bar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cocosmos/filament-sticky-save-bar
=================================

A sticky save bar for Filament that floats at the bottom of the viewport when a form has unsaved changes

v1.1.3(1mo ago)64.5k↑4633.3%2MITBladePHP ^8.2CI passing

Since May 23Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/cocosmos/filament-sticky-save-bar)[ Packagist](https://packagist.org/packages/cocosmos/filament-sticky-save-bar)[ Docs](https://github.com/cocosmos/filament-sticky-save-bar)[ RSS](/packages/cocosmos-filament-sticky-save-bar/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (4)Versions (8)Used By (0)

Filament Sticky Save Bar
========================

[](#filament-sticky-save-bar)

[![Latest Version on Packagist](https://camo.githubusercontent.com/301f989f94739e8f994663aa8510ac7066b7309062909f91806b3b54c361d809/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f636f736d6f732f66696c616d656e742d737469636b792d736176652d6261722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cocosmos/filament-sticky-save-bar)[![Total Downloads](https://camo.githubusercontent.com/936c34ae11be557f27eb1d393c8cb7dc592d65ffc5a0677a109ccf0467449f9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f636f736d6f732f66696c616d656e742d737469636b792d736176652d6261722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cocosmos/filament-sticky-save-bar)

A Filament v5 plugin that displays a floating action bar at the bottom (or top) of the viewport when a form has unsaved changes — so users on long edit pages never have to scroll back up to save.

---

Features
--------

[](#features)

- Automatically appears when the form is dirty (has unsaved changes)
- Disappears after a successful save
- Detects changes from all input types, including multiselect fields
- Reverts to hidden state if the user undoes all changes
- Hides when a modal is open
- Respects the Filament sidebar — never overlaps it
- Supports dark mode
- Translatable (8 languages included)
- Per-page opt-out via a trait

---

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

[](#requirements)

- PHP 8.2+
- Filament 5.x

---

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

[](#installation)

Install via Composer:

```
composer require cocosmos/filament-sticky-save-bar
```

Register the plugin in your panel provider:

```
use Cocosmos\FilamentStickySaveBar\StickySaveBarPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(StickySaveBarPlugin::make());
}
```

---

Basic Usage
-----------

[](#basic-usage)

Once registered, the bar appears automatically on any page that contains a `wire:submit` form with unsaved changes.

[![The bar appearing after the user edits a field on a long form](docs/images/dirty-state.png)](docs/images/dirty-state.png)

---

Configuration
-------------

[](#configuration)

All options are set fluently on the plugin instance.

### Label

[](#label)

Override the default "Unsaved changes" label:

```
StickySaveBarPlugin::make()
    ->label('You have unsaved changes')
```

### Position

[](#position)

Pin the bar to the top of the viewport instead of the bottom:

```
use Cocosmos\FilamentStickySaveBar\Enums\Position;

StickySaveBarPlugin::make()
    ->position(Position::Top)
```

ValueDescription`Position::Bottom`*(default)* Pinned to the bottom of the viewport`Position::Top`Pinned to the top of the viewport### Show On

[](#show-on)

Control when the bar becomes visible:

```
use Cocosmos\FilamentStickySaveBar\Enums\ShowOn;

StickySaveBarPlugin::make()
    ->showOn(ShowOn::Always)
```

ValueDescription`ShowOn::Dirty`*(default)* Only when the form is dirty **and** the native Save button has scrolled out of view`ShowOn::DirtyAlways`Whenever the form is dirty, regardless of whether the native Save button is in view`ShowOn::Always`Whenever the native Save button is out of view, regardless of dirty state### Extra Buttons

[](#extra-buttons)

#### Cancel

[](#cancel)

A **Cancel** button that navigates back. Enabled by default.

```
StickySaveBarPlugin::make()
    ->withCancel()        // enable (default)
    ->withCancel(false)   // disable
```

#### Save &amp; Close

[](#save--close)

A **Save &amp; Close** button that saves the form and then navigates back.

```
StickySaveBarPlugin::make()
    ->withSaveAndClose()        // enable
    ->withSaveAndClose(false)   // disable (default)
```

#### Discard

[](#discard)

A **Discard changes** button that reloads the page, reverting all unsaved edits.

```
StickySaveBarPlugin::make()
    ->withDiscard()        // enable
    ->withDiscard(false)   // disable (default)
```

[![Bar showing Cancel, Save & Close, and Save buttons](docs/images/all-buttons.png)](docs/images/all-buttons.png)

### Enabled

[](#enabled)

Disable the plugin globally, or conditionally via a closure:

```
StickySaveBarPlugin::make()
    ->enabled(false)

// Or with a closure:
StickySaveBarPlugin::make()
    ->enabled(fn () => auth()->user()->isAdmin())
```

---

Per-Page Opt-Out
----------------

[](#per-page-opt-out)

To disable the bar on a specific page, add the `HasStickySaveBarDisabled` trait to the page class:

```
use Cocosmos\FilamentStickySaveBar\Concerns\HasStickySaveBarDisabled;

class EditInvoice extends EditRecord
{
    use HasStickySaveBarDisabled;

    // ...
}
```

---

Custom Components
-----------------

[](#custom-components)

The bar detects dirty state from native `input`/`change` events and from Filament toggles. Some custom components change their state through **Livewire actions** instead — e.g. a repeater-style list with "move up", "move down", or "disable" buttons — which don't emit a native event, so the bar can't see them automatically.

For those cases, dispatch one of these events from your component. Any bubbling `CustomEvent` works (Alpine `$dispatch`, Livewire `$dispatch`, or plain `dispatchEvent`):

EventEffect`sticky-save-bar:mark-dirty`Force the bar to show`sticky-save-bar:check`Recompute dirty by comparing the form's current values against the baseline`sticky-save-bar:reset`Treat the current state as clean — re-baseline and hide the barExample — show the bar whenever your component's Alpine `state` changes:

```
// inside your component's x-data / alpine:init
this.$watch('state', () => {
    this.$dispatch('sticky-save-bar:mark-dirty');
});
```

After your own save (or when the user reverts), dispatch `sticky-save-bar:reset` to mark the state clean again.

---

Translations
------------

[](#translations)

The plugin ships with translations for 8 languages: `ar`, `de`, `en`, `es`, `fr`, `id`, `it`, `pt`.

To publish and customise them:

```
php artisan vendor:publish --tag=sticky-save-bar-translations
```

The published files will appear in `lang/vendor/sticky-save-bar/{locale}/sticky-save-bar.php`.

### Translation keys

[](#translation-keys)

KeyDefault (en)`unsaved_changes`Unsaved changes`save`Save`cancel`Cancel`save_and_close`Save &amp; Close`discard`Discard changes---

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance94

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84% 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

Every ~6 days

Total

6

Last Release

31d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/71391156?v=4)[Cocosmos](/maintainers/cocosmos)[@cocosmos](https://github.com/cocosmos)

---

Top Contributors

[![cocosmos](https://avatars.githubusercontent.com/u/71391156?v=4)](https://github.com/cocosmos "cocosmos (21 commits)")[![SkHCrusher](https://avatars.githubusercontent.com/u/5373169?v=4)](https://github.com/SkHCrusher "SkHCrusher (4 commits)")

---

Tags

laravelformsavefilamentstickyunsaved-changes

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cocosmos-filament-sticky-save-bar/health.svg)

```
[![Health](https://phpackages.com/badges/cocosmos-filament-sticky-save-bar/health.svg)](https://phpackages.com/packages/cocosmos-filament-sticky-save-bar)
```

###  Alternatives

[ysfkaya/filament-phone-input

A phone input component for Laravel Filament

3161.3M26](/packages/ysfkaya-filament-phone-input)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12453.6k](/packages/jibaymcs-filament-tour)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[wsmallnews/filament-nestedset

Filament nestedset tree builder powered by kalnoy/nestedset with Filament v4 and v5 support

197.8k19](/packages/wsmallnews-filament-nestedset)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k5](/packages/tapp-filament-form-builder)[cocosmos/filament-quick-add-select

Instantly create and select new options in Filament relationship selects without opening modals

178.4k](/packages/cocosmos-filament-quick-add-select)

PHPackages © 2026

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