Download the PHP package agenticmorf/fluxui-theme without Composer
On this page you can find all versions of the php package agenticmorf/fluxui-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download agenticmorf/fluxui-theme
More information about agenticmorf/fluxui-theme
Files in agenticmorf/fluxui-theme
Package fluxui-theme
Short Description FluxUI theme and appearance settings with color swatch pickers
License MIT
Homepage https://github.com/AgenticMorf/fluxui-theme
Informations about the package fluxui-theme
agenticmorf/fluxui-theme
Documentation is available on GitHub Pages.
FluxUI theme and appearance settings with color swatch pickers for Laravel applications using Livewire Flux.
Installation
Run the migration:
The App default accent swatch and live preview use config('fluxui-theme.defaults.accent'). Publish or merge config so it matches your app’s CSS accent (for example orange).
Requirements
- Laravel 11+
- Livewire 3+
- Livewire Flux 2+
- Livewire Volt 1+
Features
- Theme mode: Light, dark, or system
- Accent color swatches: 19 Flux accent colors
- Base color swatches: 10 Flux base colors (slate, gray, zinc, neutral, stone, mauve, olive, mist, taupe)
- User preferences stored in
appearance_preferencesJSON on User model
Integration Guide
1. CSS Setup
Your app must import Flux CSS and ensure base colors (slate, gray, zinc, neutral, stone, mauve, olive, mist, taupe) are available. Flux provides these via its dist; base color switching works by remapping --color-zinc-* to the chosen base.
In resources/css/app.css (or equivalent):
The package’s appearance component injects inline CSS when a non-zinc base is selected, redefining --color-zinc-50 through --color-zinc-950 to the chosen base (e.g. --color-slate-50, etc.). Flux’s flux.css must define those base color variables.
2. Blade: Layout Head
Include the appearance component before @fluxAppearance in your layout’s <head> so theme and base color are applied before Flux initializes:
3. Blade: Accent Color Wrapper
Wrap your main app shell with <flux:accent> so accent colors apply. Pass the effective accent from AppearanceService.
Set id="flux-accent" on that component. Flux renders a plain <div> with no id by default; the appearance settings page injects live preview CSS that targets #flux-accent, so without this id the swatch picker will not update the UI in real time.
Use this in layouts that render authenticated UI (e.g. components/layouts/app/sidebar.blade.php, header.blade.php, or a shared app layout).
4. Blade: Settings Navigation
Add a link to the appearance settings page in your settings layout. The route name is configurable (default appearance.edit):
5. Settings Layout
The appearance page expects a settings layout component that provides $heading, $subheading, and a $slot. For example:
The Volt component optionally includes partials.settings-heading for a shared settings page header. Create it if you use a common settings layout:
If the partial does not exist, it is skipped.
6. User Model
Add the cast for appearance_preferences:
The migration adds the appearance_preferences column automatically when you run php artisan migrate.
Configuration
Publish the config:
App Defaults Resolver
To use app-level defaults (e.g. from a settings table), set appearance_resolver in config/fluxui-theme.php:
The resolver should return ['accent' => string, 'base' => string, 'theme' => string].
Route
By default the appearance page is at settings/appearance with route name appearance.edit. Override in config:
Usage
Get effective appearance for the current user:
Existing Migrations
If your app already adds appearance_preferences to the users table, you can keep that migration: this package’s migration checks for the column before adding it, so running both is safe.
If the column is missing at runtime, run php artisan migrate (see installation for deploy notes).
License
MIT
All versions of fluxui-theme with dependencies
illuminate/support Version ^11.0|^12.0
livewire/livewire Version ^3.0|^4.0
livewire/flux Version ^2.0
livewire/volt Version ^1.0