- How do I install andreia/filament-ui-switcher in Laravel?
- Install the package with composer require andreia/filament-ui-switcher. It auto-registers via Laravel package discovery, then run php artisan filament:assets to publish the CSS assets. Publishing the config file is optional for common cases but available if you need deeper customization.
- What are the requirements for filament-ui-switcher?
- The package requires PHP 8.2 or higher, Laravel 11.x or 12.x, Filament 4.1+ or 5.x, and Livewire 3.x or 4.x. It technically works with Filament 4.0, but the No Topbar layout option requires Filament 4.1 or newer. Other layout options work across all Filament 4.x versions.
- Does filament-ui-switcher support Filament 4 and Filament 5?
- Yes, the package supports Filament 4.1+ and Filament 5.x. Filament 4.0 is technically compatible, but the No Topbar layout option needs Filament 4.1+. If your project upgrades across Filament major versions, test the plugin thoroughly after the upgrade.
- How do I register the UI switcher plugin in my Filament panel provider?
- Register the plugin in your Filament panel provider's plugin list, typically using the plugin's make method. No additional JavaScript framework is needed because the modal and interactivity rely on Livewire, which Filament already requires. After registering it, publish assets with php artisan filament:assets if you have not already done so.
- Can I disable specific sections or options in the UI switcher modal?
- Yes. Version 1.1.2 adds fluent methods to disable and configure individual sections programmatically during plugin registration. This lets you scope options per panel, such as showing fonts on an admin panel and colors on tenant panels. It also reduces the need to publish and edit the config file for common setups.
- Does filament-ui-switcher store preferences in the session or database?
- Session storage is the default, so preferences apply to the user's current session. Database storage is also supported for per-user persistence, but it requires a user_preferences table migration. Choose database storage only when long-term user preference persistence is important.
- How do I publish the config and assets for filament-ui-switcher?
- Run php artisan filament:assets to publish the package CSS assets to public/css/andreia/filament-ui-switcher/. To customize colors, fonts, and other options via file, publish the config with php artisan vendor:publish --tag=filament-ui-switcher-config. Run the asset publish command again after updating the package.
- Can I add custom colors and fonts to the UI switcher?
- Yes, you can choose from predefined primary colors or add custom colors, and the package includes six popular Google fonts. Version 1.1.2 adds self-hosted local font support, removing the implicit dependency on external font CDNs. If your project already self-hosts fonts, disable the packaged font path to avoid duplicate downloads.
- Will filament-ui-switcher conflict with my custom Filament theme or existing fonts?
- Custom Filament themes or global CSS may override the switcher's styles, so check CSS specificity during integration. Local font support can also collide with existing @font-face declarations or Tailwind fontFamily configuration, causing duplicate font loads or FOUT. Audit which font source wins before rolling it out.
- Does filament-ui-switcher support RTL layouts or translated UI labels?
- There is no built-in RTL or multi-language UI label support in the package. Local font support partially helps typography for global teams, but it does not provide translation or RTL layout handling. Plan those requirements separately if your application needs full localization.