waffentrager/filament-autohide-navbar
Composer 安装命令:
composer require waffentrager/filament-autohide-navbar
包简介
A Filament v3 plugin that collapses/expands the navbar on hover
README 文档
README
A FilamentPHP v3 plugin that automatically collapses the sidebar navigation to show only icons, and expands on hover to reveal full labels, badges, and grouped sub-items.
📖 Quick Start Guide | 🎨 Visual Guide | 💡 Examples
Features
- 🎯 Auto-collapse: Sidebar shows only icons by default
- 🖱️ Hover to expand: Full sidebar with labels appears on hover
- 🎨 Smooth transitions: Elegant animations for better UX
- 📱 Badge support: Badges appear when sidebar is expanded
- 📂 Group support: Handles grouped navigation items with sub-links
- 🌙 Dark mode: Full dark mode support
- 💡 Tooltips: Shows item names as tooltips when collapsed
- ⚡ Zero configuration: Works out of the box
Requirements
- PHP 8.1 or higher
- FilamentPHP v3.x
- Laravel 10.x or higher
Installation
Install the package via Composer:
composer require khisrav/filament-autohide-navbar
That's it! The plugin will automatically register itself and apply the auto-collapse behavior to your Filament sidebar.
Optional: Publish Configuration
To customize the plugin's behavior, you can publish the configuration file:
php artisan vendor:publish --tag="filament-navbar-config"
This will create a config/filament-navbar.php file where you can adjust:
- Enable/disable the plugin
- Collapsed width
- Transition duration
- Tooltip visibility
How It Works
The plugin automatically:
- Collapsed State (Default): Shows only navigation icons (width: 4rem)
- Expanded State (On Hover): Shows full navigation with labels, badges, and sub-items (width: 16rem)
- Smooth Transitions: All changes are animated with CSS transitions
- Tooltips: When collapsed, hovering over an item shows its label as a tooltip
Behavior
When Collapsed (Not Hovering)
- Only icons are visible
- Sidebar width: 4rem
- Icons are centered
- Badges are hidden
- Group sub-links are hidden
- Tooltips appear on hover
When Expanded (Hovering)
- Full labels are visible
- Sidebar width: 16rem (default)
- Badges are visible
- Grouped items show their sub-links
- Normal Filament navigation behavior
Customization
Adjusting Collapsed Width
If you want to customize the collapsed width, add this to your resources/css/app.css or custom CSS file:
aside.fi-sidebar:not(:hover) { width: 5rem !important; /* Change from default 4rem */ }
Adjusting Expanded Width
The expanded width uses Filament's CSS variable. You can customize it in your panel provider:
use Filament\Panel; public function panel(Panel $panel): Panel { return $panel // ... other configuration ->sidebarWidth('18rem'); // Default is 16rem }
Adjusting Transition Speed
Add this to your custom CSS:
aside.fi-sidebar { transition: width 0.5s ease-in-out !important; /* Change from default 0.3s */ }
Disable Tooltips
If you don't want tooltips when collapsed, add this to your custom CSS:
aside.fi-sidebar:not(:hover) .fi-sidebar-item:hover::after, aside.fi-sidebar:not(:hover) .fi-sidebar-group-button:hover::after { display: none !important; }
Compatibility
This plugin is compatible with:
- ✅ Standard navigation items
- ✅ Navigation items with icons
- ✅ Navigation items with badges
- ✅ Grouped navigation items (with sub-links)
- ✅ User menu
- ✅ Tenant switcher
- ✅ Dark mode
- ✅ Custom themes
Support
If you encounter any issues or have questions, please open an issue on GitHub.
License
This package is open-source software licensed under the MIT license.
Credits
Changelog
Please see CHANGELOG for more information on what has changed recently.
waffentrager/filament-autohide-navbar 适用场景与选型建议
waffentrager/filament-autohide-navbar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「navbar」 「sidebar」 「filament」 「filament-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 waffentrager/filament-autohide-navbar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 waffentrager/filament-autohide-navbar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 waffentrager/filament-autohide-navbar 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel Nova package that adds a notification feed in your Nova app.
Easily switch between entry types in entries section
Symfony NavBarBundle
A Laravel Nova collapsible sidebar.
Displays a list of tags that the user is following in the sidebar.
Generate navigator or menu with NavCollection
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-26