Download the PHP package andreia/filament-ui-switcher without Composer

On this page you can find all versions of the php package andreia/filament-ui-switcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-ui-switcher

Filament UI Switcher Plugin

Latest Version on Packagist Total Downloads

Switch between the available Filament layouts with a customizable UI settings slideover modal accessible from a ⚙️ icon in the topbar.

Filament UI Switcher Demo Video

Features

Customization Options:

Storage Options:

Requirements

Note: While the plugin technically works with Filament 4.0, the "No Topbar" layout option requires Filament 4.1+. Other layout options work on all Filament 4.x versions.

Installation

1. Install via Composer

The package will auto-register via Laravel's package discovery.

2. Publish Assets

This package uses Filament's asset management system. After installing, you need to publish the assets:

This will publish the CSS assets to public/css/andreia/filament-ui-switcher/ where they will be automatically loaded by Filament and cached by your browser for better performance.

Note: If you update the package, run php artisan filament:assets again to get the latest assets.

3. Publish Config

You can customize the colors, fonts, and more with the config file:

This will create a config/ui-switcher.php file where you can customize:

Default Preferences:

Available Fonts: Add or remove Google Fonts from the font picker:

Custom Colors: Customize the color palette shown in the color picker:

Custom UI icon: Customize the UI icon modal trigger:

Font Size Range: Set the min and max values for the font size slider:

Available Layouts: Control which layout options are available to users:

3. Publish View (Optional)

If you want to customize the view:

4. Register the Plugin

Add the plugin to your Filament Panel Provider (e.g., app/Providers/Filament/AdminPanelProvider.php):

Customize Icon Position

By default, the settings icon appears before the user menu (USER_MENU_BEFORE) on topbar. You can customize where the icon appears using any Filament render hook:

Available render hooks for the icon:

Enable Mode Switcher (Optional)

By default, the mode switcher is hidden. If you want to include Filament's native mode switcher (to switch between light, dark, and system) in the settings modal, enable it using the ->withModeSwitcher() method:

5. Add the UI switcher path in your theme file

Filament recommends developers create a custom theme to better support plugin's additional TailwindCSS classes. After you have created your custom theme, add the UI swicher vendor directory to your theme's theme.css file usually located in resources/css/filament/admin/theme.css:

and execute:

That's it! A ⚙️ settings icon will now appear in your topbar.

Appearance

Filament UI Switcher Screenshot

Filament UI Switcher Modal

Usage

Resetting Preferences

The settings modal includes a reset button in the header that allows users to quickly restore all customizations to their default values. When clicked, it will reset:

All preferences will be restored to the values defined in your config/ui-switcher.php file under the defaults key.

Configuration

The config file (config/ui-switcher.php) allows you to choose storage driver:

Database Storage (Optional)

If you want to persist preferences per user across sessions and devices:

Step 1: Publish and Run Migration

This adds a ui_preferences JSON column to your users table.

Step 2: Add HasUiPreferences Trait to User Model

Update your User model adding the HasUiPreferences trait and a 'ui_preferences' => 'array' cast, like so:

Step 3: Update Config

Set the driver to database in config/ui-switcher.php:

Now preferences are saved per-user and persist across logins!

Programmatic Access

You can also access and modify preferences programmatically:

If using database storage with the HasUiPreferences trait:

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


Made with ❤️ for the Filament community


All versions of filament-ui-switcher with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5|^8.4|^8.3|^8.2
filament/filament Version ^5.0|^4.1
illuminate/contracts Version ^13.0|^12.0|^11.0
livewire/livewire Version ^4.0|^3.0
spatie/laravel-package-tools Version ^1.92
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package andreia/filament-ui-switcher contains the following files

Loading the files please wait ...