Custom Flux UI components for Laravel Livewire applications.
composer require wishborn/fancy-fluxTo avoid naming conflicts with official Flux components or other custom components, you can configure a custom prefix for Fancy Flux components.
Publish the config file:
php artisan vendor:publish --tag=fancy-flux-configConfigure in config/fancy-flux.php:
return [
'prefix' => 'fancy',
'use_flux_namespace' => true,
'enable_demo_routes' => false,
];Configuration Priority:
Configuration is loaded in this order (later values override earlier ones):
- Default PHP config (
config/fancy-flux.php) - Base defaults - Environment variables (
.env) - Highest priority, overrides PHP config
Environment Variables (Optional Override):
You can override PHP config with environment variables for environment-specific settings:
FANCY_FLUX_PREFIX=fancy
FANCY_FLUX_USE_FLUX_NAMESPACE=true
FANCY_FLUX_ENABLE_DEMO_ROUTES=falseUsage Examples:
- No prefix (default): Components available as
<flux:carousel> - With prefix 'fancy': Components available as
<fancy:carousel>(and optionally<flux:carousel>ifuse_flux_namespaceistrue)
Configuration Options:
prefix- Custom prefix for components (e.g.,"fancy","custom","myapp"). Set tonullfor no prefix.use_flux_namespace- Whentrue, components are also available in thefluxnamespace for backward compatibility. Set tofalseto use ONLY the prefixed namespace.enable_demo_routes- Whentrue, demo routes are loaded from the package at/fancy-flux-demos/*. Set tofalseto publish and customize routes yourself.
Why use a prefix?
- Avoid conflicts: If Flux releases an official
carouselcomponent, your prefixed version won't conflict - Multiple packages: If you use multiple custom Flux component packages, prefixes prevent conflicts
- Clear ownership: Makes it clear which components are from Fancy Flux vs official Flux
- PHP 8.2+
- Laravel 10+ / 11+ / 12+
- Livewire 3.7+ / 4.0+
- Flux UI 2.0+
A reusable button component with standalone colors, behavioral states, shape variants, avatars, badges, icons, emojis, and flexible placement.
Quick Example:
<flux:action icon="pencil">Edit</flux:action>
<flux:action color="blue" emoji="fire">Hot!</flux:action>
<flux:action color="red" badge="3">Alerts</flux:action>
<flux:action variant="circle" icon="play" />
<flux:action avatar="/img/user.jpg" badge="Admin">John</flux:action>A flexible carousel/slideshow component with multiple variants:
- Directional - Navigation with prev/next arrows, supports autoplay
- Wizard - Step-based navigation with numbered indicators, perfect for multi-step forms
- Thumbnail - Image-based navigation with preview thumbnails
Quick Example:
<flux:carousel :data="$slides" autoplay />A native color input component with enhanced UI, swatch preview, and preset support.
Quick Example:
<flux:color-picker label="Primary Color" wire:model="primaryColor" />Display emojis using slugs, classic emoticons, or raw characters - like flux:icon but for emoji.
Quick Example:
<flux:emoji name="fire" /> {{-- π₯ from slug --}}
<flux:emoji name=":)" /> {{-- π from emoticon --}}
<flux:emoji name="rocket" size="lg" />A composable emoji picker component with category navigation, search, and customizable styling. Saves the emoji character directly (e.g., π₯), with backward compatibility for slug values.
Quick Example:
<flux:emoji-select wire:model.live="selectedEmoji" />A lightweight vertical timeline for displaying events. Pure Tailwind CSS + Alpine.js, no external dependencies. Supports stacked and alternating layouts, per-event colors, icons, emojis, and scroll-reveal animation.
Quick Example:
<flux:timeline :events="$events" />
<flux:timeline :events="$events" variant="alternating" />The FANCY facade provides programmatic access to FancyFlux features:
// Emoji lookup (787+ emojis with slug-based access)
FANCY::emoji('fire'); // Returns: π₯
FANCY::emoji(':)'); // Returns: π (emoticon support!)
FANCY::emoji()->list(); // Get all emoji slugs
FANCY::emoji()->search('heart'); // Search emojis
FANCY::emoji()->emoticons(); // Get all supported emoticons
// Carousel control
FANCY::carousel('wizard')->next();
FANCY::carousel('wizard')->goTo('step-3');
// Configuration
FANCY::prefix(); // Custom prefix or null
FANCY::components(); // List of components- Usage Guide - Comprehensive documentation for all components
- Component Docs - Detailed guides for each component:
- Prefix Configuration - Configure custom component prefixes to avoid naming conflicts
- Troubleshooting - Common issues and solutions by version
Ready-to-use examples are available in the demos/ folder. Copy the demo files into your Laravel application to get started quickly:
- Action Examples - State variants, icons, emojis, and placements
- Basic Carousel - Simple data-driven carousel
- Wizard Form - Multi-step form with validation
- Nested Carousel - Nested carousels with parent advancement
- Dynamic Carousel - Add/remove slides dynamically
- Color Picker Examples - All color picker variants
- Emoji Select Examples - All emoji select variants
- Timeline Examples - Standalone, with controls, inside carousel
See the demos README for details.
Fancy Flux includes AI guidelines for Laravel Boost. When you install this package and run php artisan boost:install, Boost will automatically load the guidelines to help AI assistants generate correct code for Fancy Flux components.
You can also add custom AI guidelines for Fancy Flux by creating a .ai/guidelines/fancy-flux.md file in your application. This allows you to customize how AI assistants understand and use Fancy Flux components in your specific project context.
-
Update via Composer:
composer update wishborn/fancy-flux
-
Clear caches:
php artisan config:clear php artisan view:clear
-
Review changelog: Check CHANGELOG.md for version-specific changes
-
Test your application: Verify all components work as expected
New Feature: Component Prefix Configuration
Version 1.0.8 introduces optional component prefix configuration to avoid naming conflicts. This is backward compatible - existing code will continue to work without changes.
Optional: Configure a Prefix
If you want to use a custom prefix (recommended for new projects):
-
Publish the config file:
php artisan vendor:publish --tag=fancy-flux-config
-
Set prefix in
config/fancy-flux.php:return [ 'prefix' => 'fancy', 'use_flux_namespace' => true, 'enable_demo_routes' => false, ];
-
Clear config cache:
php artisan config:clear
No Action Required
If you don't configure a prefix, components continue to work exactly as before:
<flux:carousel>- Still works<flux:color-picker>- Still works<flux:emoji-select>- Still works
Migration Path (Optional)
If you want to migrate to a prefixed namespace:
- Set
FANCY_FLUX_PREFIXand keepFANCY_FLUX_USE_FLUX_NAMESPACE=true - Gradually update templates to use the prefixed version
- Once all templates are updated, optionally set
FANCY_FLUX_USE_FLUX_NAMESPACE=false
See Prefix Configuration for detailed migration steps.
MIT
