Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fluxui Theme Laravel Package

agenticmorf/fluxui-theme

FluxUI theme and appearance settings for Laravel apps using Livewire Flux. Offers light/dark/system mode, accent and base color swatch pickers, and stores user preferences in an appearance_preferences JSON field on the User model.

View on GitHub
Deep Wiki
Context7

title: Usage

Usage

User Model

Add the cast for appearance_preferences:

protected $casts = [
    'appearance_preferences' => 'array',
];

CSS Setup

Your app must import Flux CSS. In resources/css/app.css:

[@import](https://github.com/import) 'tailwindcss';
[@import](https://github.com/import) '../../vendor/livewire/flux/dist/flux.css';

[@source](https://github.com/source) '../../vendor/livewire/flux/stubs/**/*.blade.php';

[@custom-variant](https://github.com/custom-variant) dark (&:where(.dark, .dark *));

Layout Head

Include the appearance component before [@fluxAppearance](https://github.com/fluxAppearance) in your layout <head>:

[@vite](https://github.com/vite)(['resources/css/app.css', 'resources/js/app.js'])
<x-fluxui-theme::appearance />
[@fluxAppearance](https://github.com/fluxAppearance)

Accent Color Wrapper

Wrap your main app shell with <flux:accent>:

[@php](https://github.com/php)
    $appearance = app(\AgenticMorf\FluxuiTheme\AppearanceService::class)->getEffective(auth()->user());
[@endphp](https://github.com/endphp)
<body>
    <flux:accent :color="$appearance['accent']">
        {{-- Your app content --}}
    </flux:accent>
</body>

Settings Navigation

Add a link to the appearance page:

<flux:navlist.item :href="route('appearance.edit')" wire:navigate>{{ __('Appearance') }}</flux:navlist.item>

Settings Layout

The appearance page expects a settings layout with $heading, $subheading, and $slot. Optionally create partials.settings-heading for a shared settings header.

Get Effective Appearance

$appearance = app(\AgenticMorf\FluxuiTheme\AppearanceService::class)->getEffective(auth()->user());
// ['accent' => 'blue', 'base' => 'zinc', 'theme' => 'system']
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4