Skip to content
UI Brok

Loading…

No results

Browse catalog

JavaScript and NPM

Blade-only components do not add JavaScript. Interactive components copy behavior files under resources/js/ui and register Alpine data modules from your app bundle.

Imports

resources/js/ui/index.js JS
import './dialog.js';
import './dropdown.js';
import './ai/prompt.js';

ui:add appends these imports when an installed registry item ships JS.

Alpine setup

resources/js/app.js JS
import Alpine from 'alpinejs';
import './ui/index.js';

window.Alpine = Alpine;
Alpine.start();

NPM dependencies

The CLI prints any npm packages declared by the manifest. It does not mutate package.json or run npm automatically.

terminal
npm install apexcharts
npm run build

Large optional dependencies should be lazy-loaded from the copied behavior file so pages that do not use the component stay lean.