- How do I install this Filament collapsible sidebar plugin?
- Run `composer require slym758/filament-collapsible-sidebar` and register the plugin in your `PanelProvider` by adding `CollapsibleSidebarPlugin::make()` to the `plugins()` array. No additional configuration is needed for basic functionality.
- Does this plugin work with Filament 4.x versions?
- Yes, this plugin is explicitly designed for Filament 4.x and requires PHP 8.2+. Always check the package’s changelog for updates if you’re using a newer Filament minor version.
- Can I customize the toggle button or animations?
- The toggle button can be styled using Filament’s existing theming system (e.g., CSS classes from `filament/support`). Animations rely on CSS transitions and can be overridden by adding custom CSS to your Filament panel.
- Will the sidebar state persist after page refresh?
- Yes, the plugin uses `localStorage` to save the collapsed/expanded state, so it persists across page refreshes. However, this is client-side only and won’t sync across devices or browsers.
- Is there mobile support, or is it desktop-only?
- This plugin is desktop-only by design and hides the toggle button on mobile devices. If you need mobile support, you’ll need to implement custom logic or consider alternative solutions.
- What if my Filament panel uses custom sidebar layouts?
- The plugin assumes a standard Filament sidebar structure. If your panel uses non-standard layouts (e.g., multi-column sidebars or nested menus), the plugin may not render correctly. Test thoroughly with your existing UI.
- Are there any known conflicts with other Filament plugins?
- Conflicts *may* occur if other plugins modify the sidebar (e.g., `filament-widgets` or custom navigation plugins). Test the plugin alongside your existing plugins to ensure compatibility, especially if they inject sidebar content dynamically.
- How can I sync the sidebar state across devices or sessions?
- The plugin relies on `localStorage`, which is browser-specific. For cross-device sync, you’d need to implement server-side state management, such as storing the preference in Laravel sessions or a simple API endpoint.
- Does this plugin support dark mode out of the box?
- Yes, the plugin automatically adapts to Filament’s dark mode (if enabled) without requiring additional CSS overrides. It works seamlessly with themes like `filament/panels` dark mode.
- What are the alternatives if I need mobile support or more features?
- For mobile support, consider building a custom solution using Filament’s frontend tools (Alpine.js, Tailwind) or exploring plugins like `filament-responsive` for adaptive layouts. If you need advanced sidebar features, check Filament’s ecosystem for plugins offering custom navigation.