composer require getartisanflow/wireflow
WireFlow auto-discovers its service provider — no manual registration needed.
Run the install command to publish config, assets, and add JS/CSS imports automatically:
php artisan wireflow:install
npm run build
That's it — you're ready to use <x-flow> in your Blade views. See Artisan Commands for details.
If you prefer to set things up manually, follow the steps below.
WireFlow bundles AlpineFlow's JS and CSS in its Composer package. Import from the vendor path in your resources/js/app.js:
import AlpineFlow from '../../vendor/getartisanflow/wireflow/dist/alpineflow.bundle.esm.js';
document.addEventListener('alpine:init', () => {
window.Alpine.plugin(AlpineFlow);
});
Do not import Alpine separately — Livewire bundles it. Do not call
Alpine.start()— Livewire handles that.
In your resources/css/app.css:
/* Structural CSS (required) */
[@import](https://github.com/import) '../../vendor/getartisanflow/wireflow/dist/alpineflow.css';
/* Theme (pick one) */
[@import](https://github.com/import) '../../vendor/getartisanflow/wireflow/dist/alpineflow-theme.css';
Or use the Flux UI theme for Tailwind v4 / Flux apps:
[@import](https://github.com/import) '../../vendor/getartisanflow/wireflow/dist/alpineflow.css';
[@import](https://github.com/import) '../../vendor/getartisanflow/wireflow/dist/alpineflow-theme-flux.css';
php artisan vendor:publish --tag=wireflow-config
This publishes config/wireflow.php. See Configuration.
WireFlow bundles AlpineFlow core only. Layout engines, collaboration, and whiteboard tools are installed separately via npm. The core and addons share a global registry, so they work together regardless of how each was loaded.
npm install [@getartisanflow](https://github.com/getartisanflow)/alpineflow
This gives you access to addon sub-path imports. You don't need to import core from this package — WireFlow's vendor bundle provides the core.
Only install what you need:
npm install [@dagrejs](https://github.com/dagrejs)/dagre # for dagre layout
npm install d3-force # for force-directed layout
npm install d3-hierarchy # for tree/cluster layout
npm install elkjs # for ELK layout engine
npm install yjs y-websocket y-protocols # for real-time collaboration
# whiteboard has no peer deps
// Core from WireFlow vendor bundle
import AlpineFlow from '../../vendor/getartisanflow/wireflow/dist/alpineflow.bundle.esm.js';
// Addons from npm (only import what you installed)
import AlpineFlowDagre from '[@getartisanflow](https://github.com/getartisanflow)/alpineflow/dagre';
import AlpineFlowWhiteboard from '[@getartisanflow](https://github.com/getartisanflow)/alpineflow/whiteboard';
document.addEventListener('alpine:init', () => {
window.Alpine.plugin(AlpineFlow);
window.Alpine.plugin(AlpineFlowDagre);
window.Alpine.plugin(AlpineFlowWhiteboard);
});
| Addon | Import | Peer Dependency | Enables |
|---|---|---|---|
| Dagre layout | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/dagre |
[@dagrejs](https://github.com/dagrejs)/dagre |
$flow.layout() |
| Force layout | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/force |
d3-force |
$flow.forceLayout() |
| Tree layout | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/hierarchy |
d3-hierarchy |
$flow.treeLayout() |
| ELK layout | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/elk |
elkjs |
$flow.elkLayout() |
| Whiteboard | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/whiteboard |
— | Drawing tools directives |
| Collaboration | [@getartisanflow](https://github.com/getartisanflow)/alpineflow/collab |
yjs, y-websocket, y-protocols |
Real-time sync |
See the AlpineFlow addon docs for details.
How can I help you explore Laravel packages today?