TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/livewire/flux/llms.txt
Use this file to discover all available pages before exploring further.
FluxManager class is the core manager for the Flux UI component library. It handles component registration, asset rendering, and provides utility methods for working with Flux components.
Overview
The FluxManager is typically accessed through theFlux facade, but can also be accessed directly via the container:
Properties
hasRenderedAssets
Methods
boot()
Bootstrap the FluxManager instance.pro()
Check if Flux Pro is installed.true if the livewire/flux-pro package is installed, false otherwise
Example:
ensurePro()
Ensure Flux Pro is installed, throw an exception if not.\Exception if Flux Pro is not installed
Example:
scripts()
Generate the Flux JavaScript script tag.Configuration optionsOptions:
nonce(string): CSP nonce value for the script tag
AssetManager::scripts().
fluxAppearance()
Generate the Flux appearance management script and styles.Configuration optionsOptions:
nonce(string): CSP nonce value for inline scripts and styles
editorStyles()
Generate the Flux editor CSS link tag (Flux Pro only).editorScripts()
Generate the Flux editor JavaScript script tag (Flux Pro only).classes()
Create a class builder instance for constructing CSS class strings.Optional CSS classes to initialize the builder with
ClassBuilder instance
Example:
disallowWireModel()
Throw an exception if wire: attributes are present.The attribute bag to check
The component name for the error message
\Exception if any wire:* attributes are found
Example:
splitAttributes()
Split an attribute bag into two bags based on attribute names.The attribute bag to split
Array of attribute names to split by
If
true, uses exact matching. If false, uses startsWith matching[matched, unmatched]
Example:
forwardedAttributes()
Extract specific attributes from an attribute bag for forwarding to nested components.The attribute bag to extract from
Array of prop keys to extract (supports both camelCase and kebab-case)
attributesAfter()
Extract attributes with a specific prefix and remove them from the original bag.The prefix to match (e.g., ‘icon:’)
The attribute bag to extract from (modified in place)
Default attributes for the new bag
applyInset()
Generate CSS classes for inset positioning.Inset specification:
true for all sides, space-separated sides, or nullCSS class for top inset
CSS class for right inset
CSS class for bottom inset
CSS class for left inset
componentExists()
Check if a Flux component exists.The component name to check
true if the component exists, false otherwise
Example:
markAssetsRendered()
Mark assets as rendered.$hasRenderedAssets to true. Called automatically by scripts() and fluxAppearance().
Related
- Flux Facade - Convenient facade for accessing FluxManager
- AssetManager - Asset management functionality