Installation Add the package via Composer:
composer require blast-project/ui-bundle
Publish the bundle’s assets and configuration:
php artisan vendor:publish --provider="Blast\UIBundle\BlastUIBundle" --tag="public"
php artisan vendor:publish --provider="Blast\UIBundle\BlastUIBundle" --tag="config"
First Use Case: Basic UI Integration
resources/views/layouts/app.blade.php:
@vite(['resources/css/app.css', 'node_modules/blast-ui-bundle/dist/css/blast.css'])
@vite(['resources/js/app.js', 'node_modules/blast-ui-bundle/dist/js/blast.js'])
{{ blast_alert('Success!') }}).Key Files to Review
config/blast-ui.php: Core settings (theming, component defaults).resources/views/vendor/blast-ui/: Pre-built components (alerts, modals, etc.).node_modules/blast-ui-bundle/src/: Core JavaScript/TypeScript logic.{{ blast_modal('Edit User', 'user-edit-form') }}
{{ blast_button('Save', 'primary', 'submit-form') }}
{{ blast_alert($message, 'info') }}
blast-ui config in config/blast-ui.php:
'theme' => [
'primary' => '#3498db',
'danger' => '#e74c3c',
],
resources/scss/blast/_variables.scss:
$blast-primary: #2ecc71;
document.querySelector('[data-blast-modal]').addEventListener('blast:open', (e) => {
console.log('Modal opened:', e.detail.id);
});
BlastUI.registerComponent('blast-tooltip', {
template: '<div class="tooltip">{{ text }}</div>',
props: ['text']
});
{{ blast_form('user', [
'name' => 'text|required',
'email' => 'email|required'
]) }}
// vite.config.js
export default {
build: {
rollupOptions: {
input: {
blast: './node_modules/blast-ui-bundle/dist/js/blast.js'
}
}
}
};
node_modules/blast-ui-bundle/dist/ is included in your Vite/Laravel Mix config. Missing assets will break UI rendering.php artisan view:clear
BlastUI global. Use TypeScript for large projects:
import { BlastUI } from 'blast-ui-bundle';
CHANGELOG.md for breaking changes in minor updates.config/blast-ui.php:
'debug' => env('APP_DEBUG', false),
@error blocks:
@error
{{ blast_alert('Failed to render component.', 'danger') }}
@enderror
BlastUI.Component:
class CustomComponent extends BlastUI.Component {
static template = `<button @click="handleClick">{{ label }}</button>`;
}
BlastUI.register('custom-button', CustomComponent);
BlastUI\Events\ComponentRendered).$response = $this->view('dashboard', ['message' => 'Test']);
$response->assertSee('blast_alert("Test")');
@media (prefers-color-scheme: dark) {
:root {
--blast-primary: #9b59b6;
}
}
<blast-modal data-src="/modal-content"></blast-modal>
axe or Lighthouse—the bundle includes ARIA attributes by default.How can I help you explore Laravel packages today?