aymanalhattami/filament-slim-scrollbar
Installation Run a single Composer command to add the package:
composer require aymanalhattami/filament-slim-scrollbar
No additional configuration is required for basic usage—Filament 3/4/5 auto-detects the package.
First Use Case
Where to Look First
src/FilamentSlimScrollbarServiceProvider.php (for registration logic).resources/views/vendor/filament-slim-scrollbar/styles.blade.php (if you need to customize styles).Default Integration
Targeted Application
<div class="filament-slim-scrollbar">
<!-- Your scrollable content -->
</div>
!important or higher specificity in your app’s CSS.Dark/Light Mode Handling
Testing
filament-slim-scrollbar CSS is loaded (it is by default).<div> with the filament-slim-scrollbar class.styles hook. No additional bundling is needed.Firefox Limitations
min-width: 1024px) by default.@media (min-width: 1024px) {
html:not(.firefox) ::-webkit-scrollbar { /* Your custom styles */ }
}
Nested Scrollbars
overflow: hidden to the parent container or use position: fixed for modals.Custom CSS Conflicts
::-webkit-scrollbar styles in your app may conflict with the package.::-webkit-scrollbar {
width: 0 !important;
height: 0 !important;
}
Filament Version Mismatch
filament-slim-scrollbar classes).php artisan view:clear) if styles aren’t applying.::-webkit-scrollbar to identify conflicting styles.Custom Styling
php artisan vendor:publish --tag="filament-slim-scrollbar-assets"
resources/views/vendor/filament-slim-scrollbar/styles.blade.php.Conditional Loading
<style>
.no-slim-scrollbar ::-webkit-scrollbar {
width: auto;
height: auto;
}
</style>
Then add the no-slim-scrollbar class to containers where slim scrollbars are unwanted.Dynamic Theming
Theme service:
use Filament\Support\Facades\FilamentTheme;
FilamentTheme::register(function () {
return [
'scrollbar-width' => 'thin', // or 'auto'
];
});
Then update the package’s CSS to read this value.How can I help you explore Laravel packages today?