- How do I install awcodes/filament-sticky-header in a Laravel Filament panel?
- Install the package with composer require awcodes/filament-sticky-header. If you are using Filament Panels, first set up a custom theme as described in the Filament docs. Import the plugin CSS into your theme CSS file or your app CSS file when using standalone packages. Then register StickyHeaderPlugin::make() in the plugins array of your panel provider.
- Which Filament versions does awcodes/filament-sticky-header support?
- The README compatibility table maps package versions to Filament versions: 1.x supports Filament 2.x, 2.x supports Filament 3.x, 3.x supports Filament 4.x, and 4.x supports Filament 4.x and 5.x. Check the compatibility table before installing, especially if your app uses Filament 5.x. Align the plugin major version with your Filament major version to avoid issues.
- Do I need a custom Filament theme to use the sticky header plugin?
- Yes, the README notes that Filament Panels users should set up a custom theme first if they have not already done so. The plugin CSS must be imported into your theme CSS file, or into your app CSS file when using standalone packages. This explicit CSS import is how the plugin’s styling is loaded into the panel.
- How do I enable the floating or colored sticky header styles?
- Call the floating() method when registering StickyHeaderPlugin to use the Floating theme. You can also chain colored() to apply your primary background color to the header. Both methods can receive closures so the behavior can be evaluated conditionally, such as based on user preferences. Register them in your panel provider’s plugins array.
- Can I disable the sticky header on specific Filament pages?
- Yes, the disabledOn() method was added in v4.1.0 and lets you exclude specific pages from sticky header behavior. Pass the relevant page classes to that method when configuring the plugin. This is useful for dashboards, reports, or any custom pages where a sticky header is not desirable.
- Does the plugin work with Filament page transitions and Livewire navigation?
- The plugin uses Alpine.js for the sticky behavior and is designed to work within Filament’s panel context. According to the technical assessment, reinitialization on wire:navigated was fixed in v2.0.6. CSS and JavaScript are scoped to the panel context in v4.1.0 and later, reducing global side effects.
- Is awcodes/filament-sticky-header safe and performant for production?
- The plugin is lightweight, with the assessment noting roughly 50KB of CSS and JS per release notes and no blocking operations. It uses Filament’s default Alpine.js and Tailwind-based styles rather than aggressive overrides. As with any frontend change, test in staging and audit with Lighthouse if critical rendering path performance matters.
- How should I test the sticky header plugin in my Laravel application?
- Validate sticky behavior on list pages, record pages, and any custom pages where the header should remain visible. Check page transitions, notification overlays, mobile responsiveness, and any z-index interactions with Filament UI elements. Testing in staging before production helps catch theme or CSS import conflicts.
- What are alternatives to using awcodes/filament-sticky-header?
- A common alternative is implementing sticky headers yourself with Tailwind CSS position sticky classes or custom Filament theme overrides. The plugin is purpose-built for Filament Panels and handles details such as Alpine.js behavior and page transition reinitialization. For non-Filament Laravel applications, the plugin is not applicable and a custom CSS approach is more appropriate.
- How is awcodes/filament-sticky-header maintained for new Filament releases?
- The package is published on GitHub and Packagist under the MIT license, with a README compatibility table linking package versions to Filament versions. Check the repository releases and release notes for current support and fixes before upgrading Filament. Because the plugin is tightly coupled to Filament’s panel structure, verify version alignment when moving to a new Filament major release.