nyoncode / wire-core
Shared foundation for the Wire ecosystem – traits, actions, modals, notifications, icons, colors.
Package info
pkg:composer/nyoncode/wire-core
Requires
- php: ^8.2
- illuminate/database: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- livewire/livewire: ^4.0
- nyoncode/laravel-package-toolkit: ^2.5.2
Requires (Dev)
- laravel/pint: ^1.29
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^4.0|^5.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.10.6
- 2.10.5
- 2.10.4
- 2.10.3
- 2.10.2
- 2.10.1
- 2.10.0
- 2.10.0-rc.2
- 2.10.0-rc.1
- 2.9.14
- 2.9.13
- 2.9.12
- 2.9.11
- 2.9.10
- 2.9.9
- 2.9.8
- 2.9.7
- 2.9.6
- 2.9.5
- 2.9.4
- 2.9.3
- 2.9.2
- 2.9.1
- 2.9.0
- 2.8.3
- 2.8.2
- 2.8.1
- 2.8.0
- 2.7.1
- 2.7.0
- 2.6.0
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.0
- 1.17.5
- 1.17.4
- 1.17.2
- 1.17.1
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.2
- 1.13.1
- 1.12.1
- 1.12.0
- 1.11.0
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.0.2
- 0.0.1
This package is auto-updated.
Last update: 2026-11-17 16:24:32 UTC
README
Wire Core
Shared foundation for the Wire ecosystem - traits, actions, modals, notifications, widgets, audit logging, icons, and colors.
Requirements
- PHP 8.2+
- Laravel 12.61+ or 13.12+
- Livewire 4.x
Installation
Wire Core is typically installed as a dependency of wire-forms or wire-table. You don't usually install it directly:
composer require nyoncode/wire-core
Tailwind CSS
Wire Core's Blade components (icons, badges, buttons, dropdowns, modals, notifications) use Tailwind CSS classes. Add the package views and src to your Tailwind content configuration. Some classes are resolved in PHP (the bottom sheet on a phone), so scanning the views alone misses them:
Tailwind 3 (tailwind.config.js):
export default { content: [ // ... your app paths './vendor/nyoncode/wire-core/resources/views/**/*.blade.php', './vendor/nyoncode/wire-core/src/**/*.php', ], }
Tailwind 4 (resources/css/app.css):
@source "../../vendor/nyoncode/wire-core/resources/views"; @source "../../vendor/nyoncode/wire-core/src";
Alpine.js
Wire Core uses Alpine.js (included via Livewire 4). No separate Alpine installation needed.
Its interactive controllers — wireDropdown, wireContextMenu, wireTabs, wireWizard,
wireEditableCell — ship as a pre-built bundle served from the package's
own route: nothing to publish, no npm, no build step. Add one directive to your layout
<head> so every installed Wire package's controllers are in the initial document:
<head> @vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles @wireStackScripts </head>
It is additive — each surface still emits its own bundle as a fallback — but an app that
navigates with wire:navigate wants it: Livewire's cached Back/Forward path does not wait
for newly injected <head> scripts, so only a bundle that was already in the document is
safe from that race. @wireStackScripts('wire-core') narrows the output to one package.
Packages declare their bundles with the canonical Foundation\Assets\AssetManager; see
JavaScript Assets.
What's Included
Concerns (Traits)
Shared traits used by Actions, Columns, Fields, and other components:
HasColor– Tailwind CSS color class managementHasIcons– SVG icon rendering with 50+ built-in iconsHasVisibility– Conditional visibility, permissions, disabled stateHasDynamicProperties– Closure-based dynamic properties (label, color, icon per record)HasKeyboardShortcut– Keyboard shortcut support with Alpine.js integrationHasLifecycle– Before/after hooks with halt supportHasLoadingState– Loading indicators, debounce, timeoutHasModal– Modal/confirmation dialog configurationHasButtonStyles– Button CSS class generation
Actions
Complete action system for row, bulk, and header actions:
Action,BulkAction,HeaderAction– Action typesActionGroup– Dropdown groupingActionHalt– Pipeline halt with modalDeleteAction,EditAction,ViewAction– Pre-built actionsModalStep,ModalFooterAction– Multi-step wizard support
Notifications
Pluggable notification system with three built-in drivers:
SessionDriver– Laravel session flash (default)LivewireEventDriver– Livewire browser eventsFlasherDriver– PHP Flasher integration
Modals
Reusable modal primitives for actions and custom UI:
- Confirmation dialogs
- Slide-overs
- Multi-step wizards
Widgets
Dashboard building blocks:
- Stats overview widgets
- Chart widgets
- Table widgets
- Custom Blade-backed widgets
Plugins
Application and package extension points:
- Plugin lifecycle with
register()andboot() - Table and action macros
- Hook callbacks
- Column and filter type registries
- Query pipe registry
Audit Log
Optional audit logging for Eloquent model changes and table-related events:
HasAuditablemodel traitAuditEntrymodel andaudit_logsmigrationAuditTrailActionrow action for tablesAuditLogger::withoutAuditing()for imports and maintenance jobs
Configuration
Publish the config file:
php artisan vendor:publish --tag=wire-core-config
Publish audit migrations when you use the audit log:
php artisan vendor:publish --tag=wire-core-migrations php artisan migrate
Documentation
| Document | Description |
|---|---|
| Core Foundation | Shared traits, icons, colors, and Blade helpers |
| Actions | Row, bulk, header actions, and action groups |
| Notifications | Notification value objects and drivers |
| Modals | Confirmations, slide-overs, and wizards |
| Widgets | Dashboard widgets |
| Plugins | App and package extension points |
| Audit Log | Audit setup and usage |
| Configuration | Config files and environment variables |
License
MIT