Installation
Flux requires a modern Laravel application with Livewire v3 and Tailwind CSS v4. Follow this guide to get Flux up and running in your project.Prerequisites
Before installing Flux, ensure your application meets these requirements:Laravel
Version 10.0 or higher
Livewire
Version 3.5.19 or higher
Tailwind CSS
Version 4.0 or higher
If you don’t have Tailwind CSS installed yet, follow the Tailwind CSS installation guide for Laravel before proceeding.
Install Flux
Install via Composer
Run the following command from your project’s root directory:This will install the Flux package and register the service provider automatically through Laravel’s package auto-discovery.
Configure Tailwind CSS
Add the Flux CSS imports to your
resources/css/app.css file:resources/css/app.css
The
@custom-variant directive enables Flux’s dark mode support. This is required for proper dark mode functionality.Add Flux Directives to Your Layout
Add the
@fluxAppearance and @fluxScripts Blade directives to your layout file (e.g., resources/views/layouts/app.blade.php):resources/views/layouts/app.blade.php
@fluxAppearanceshould be placed in the<head>section@fluxScriptsshould be placed before the closing</body>tag
Optional: Use the Inter Font
Flux is designed to work beautifully with the Inter font family. While optional, we recommend using it for the best visual experience.Verify Installation
Create a simple test view to verify Flux is working:resources/views/test-flux.blade.php
Upgrading Flux
To ensure you have the latest version of Flux, regularly update your dependencies:Next Steps
Quick Start
Learn how to use Flux components in your application
Flux Pro
Install Flux Pro to unlock all components
Flux Pro Installation
If you’ve purchased a Flux Pro license, follow these additional steps to activate it:Activate Your License
Run the activation command:You’ll be prompted to enter:
- Your email address (the one used for purchase)
- Your license key
Your license key is tied to your domain. For development, the license will work on
localhost and .test domains automatically.Customizing Components
To customize specific Flux components, you can publish their Blade view files:resources/views/flux/ and will override the default Flux components.
To publish all components at once:
Troubleshooting
Components are not styled
Components are not styled
Make sure you’ve imported the Flux CSS file in your Also ensure you’re running your build process (
resources/css/app.css:npm run dev or npm run build).Dark mode is not working
Dark mode is not working
Ensure you’ve added the custom variant for dark mode:Dark mode is triggered by adding the
dark class to the <html> element.JavaScript features are not working
JavaScript features are not working
Make sure you’ve added the
@fluxScripts directive before the closing </body> tag in your layout.Livewire wire:model is not working
Livewire wire:model is not working
Ensure you have Livewire v3.5.19 or higher installed:Update if necessary:
What’s Next?
Quick Start Guide
Learn how to build your first components with Flux