Sidebar Co-scroll by Steven Lu
CommunityFilament gives a long sidebar its own scroll box. Sidebar Co-scroll makes it move with the page instead: scroll down and it follows until its last item reaches the bottom of the window; scroll up and it comes straight back, stopping under the topbar. A menu that fits stays put. Works with every sidebar layout and the mobile drawer. No theme rebuild or config needed, and it only loads on the panels you register it on.
Author:
Steven Lu
Package health
Automated checks of this plugin's Composer package
15 checks
- Passed: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Skipped: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Passed: Dependabot or Renovate configured
- Passed: Dependency update cooldown configured
- Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; no release date available.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
filament/
namespace. Review the source and install at your own risk. Found
malware or an unresolved security issue the author won't
address?
Report it
.
Documentation
- Installation
- Usage
- Known limitations
- Testing
- Changelog
- Contributing
- Security Vulnerabilities
- Credits
- License
Filament gives a long sidebar its own scroll box. Sidebar Co-scroll makes it move with the page instead: scroll down and it follows until its last item reaches the bottom of the window; scroll up and it comes straight back, stopping under the topbar. A menu that fits stays put.
It works with every sidebar layout (collapsible, fully collapsible and top navigation) and with the mobile drawer. There's no theme to rebuild or config to publish, and it only loads on the panels you register it on.
Requires Filament 4 or 5.
#Installation
composer require the14thsky/filament-sidebar-coscroll
The plugin ships a small compiled stylesheet and script, so no theme or Tailwind changes are needed. Filament publishes them when Composer runs php artisan filament:upgrade. Otherwise, run:
php artisan filament:assets
#Usage
Register the plugin on each panel that should co-scroll:
use The14thsky\SidebarCoscroll\SidebarCoscrollPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(SidebarCoscrollPlugin::make());
}
Panels without the plugin keep Filament's own sidebar scrolling.
#Options
| Method | Default | Description |
|---|---|---|
topbarOffset(?string $offset) |
4rem |
Height of everything above the sidebar, such as the topbar and any banner. The sidebar's minimum height is the window height minus this. |
mobileDrawer(bool $condition = true) |
true |
Whether the open mobile drawer co-scrolls with the page. |
SidebarCoscrollPlugin::make()
->topbarOffset('6.25rem')
->mobileDrawer(false)
#Known limitations
In SPA mode, Filament normally keeps the sidebar's scroll position when you move between pages. With co-scroll the sidebar scrolls with the page instead, and each SPA navigation starts the new page at the top, so the sidebar starts from the top too. After clicking an item far down a long menu, you'll need to scroll back down to see it.
#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
#License
The MIT License (MIT). Please see License File for more information.
The author
Web developer with 10+ years of experience building web applications, and SaaS platforms are what I enjoy most. I work mainly with Laravel, Livewire, Filament and Vue. I value efficiency, so I'm always optimising for performance: lean queries, fast pages and smooth deployments.
Featured Plugins
A selection of plugins curated by the Filament team
Soft Theme
A theme that gives panels a warm, approachable look with rounded shapes, gentle colors, and serif headings.
Filament
Custom Dashboards
Let your users build and share their own dashboards with a drag-and-drop interface. Define your data sources in PHP and let them do the rest.
Filament
Spotlight Pro
Browse your Filament Panel with ease. Filament Spotlight Pro adds a Spotlight like Command Palette to your Filament Panel.
Dennis Koch