Download the PHP package malico/wired without Composer
On this page you can find all versions of the php package malico/wired. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package wired
Short Description Livewire utilities and macros for streamlined component development
License MIT
Informations about the package wired
Wired
Alpine and Livewire directives for common input behaviors — slugs, case transforms, email masks, placeholders, and action callbacks.
Installation
Register in resources/js/app.js:
Or register individually:
Directives
x-slug / wire:slug
Watches a source property and auto-generates a URL-safe slug. Updates reactively. Stops updating if the user manually edits the field.
Default separator: -
Underscore separator:
Multiple sources — values are joined with a space before slugifying:
On blur, the field normalizes whatever the user typed into a valid slug.
x-case / wire:case
Watches a source property and transforms it into a specific case format. Same reactive behavior as x-slug.
Modifiers
| Modifier | Input | Output |
|---|---|---|
camel |
hello world |
helloWorld |
pascal |
hello world |
HelloWorld |
snake |
hello world |
hello_world |
constant |
hello world |
HELLO_WORLD |
title |
hello world |
Hello World |
dot |
hello world |
hello.world |
kebab |
hello world |
hello-world |
lower |
Hello World |
hello world |
upper |
Hello World |
HELLO WORLD |
slug |
Hello World! |
hello-world |
slug.underscore |
Hello World! |
hello_world |
Multiple sources:
Full Alpine example:
Full Livewire example:
x-placeholders
Autocomplete for placeholders inside a textarea or input. Type the trigger character to open the menu. ESC to dismiss.
Modifiers
| Modifier | Trigger | Inserted | Closed by |
|---|---|---|---|
| (default) | { |
{name} |
} |
.double |
{{ |
{{name}} |
}} |
.hash |
# |
#name |
space |
.at |
@ |
@name |
space |
.dollar |
${ |
${name} |
} |
.percent |
% |
%name% |
% |
Livewire — pass a wire property name (array) instead of an inline list:
x-email-mask
Validates email input against two formats: a plain address ([email protected]) or a named address (Name <[email protected]>).
wire:after
Runs a JS expression after a Livewire action completes. Useful for closing modals, resetting UI state, or dispatching events after form submissions.
The expression evaluates in Alpine scope, so $flux, $dispatch, $refs, etc. all work.
Inferred action — when the element also has wire:click or wire:submit, the action name is picked up automatically:
Explicit action name — pass the action name as the first argument when you need to be specific:
This also handles actions with arguments in the expression:
.finish modifier — by default the expression runs on onSuccess (after the server responds, before DOM morph). Add .finish to run after the DOM has fully updated:
Confirmation modal example:
$memo
Persists a value to sessionStorage — survives page refreshes within the same tab, cleared when the tab closes.
Use .as() to set an explicit storage key:
$vault
Persists a value to IndexedDB — survives full browser close/reopen. Suited for larger or long-lived data.
Use .as() to set an explicit storage key:
Note: IndexedDB reads are async. The initial value will be set on first render and updated once the stored value loads.
PHP Macros
$attributes->for(prefix)
Passes scoped attributes from a parent to specific elements inside a child component. Any attribute prefixed with title: becomes a plain attribute on the element that calls $attributes->for('title').
Child component — resources/views/components/card.blade.php:
Parent usage:
Rendered output:
Any attribute works — not just class:
Development
All versions of wired with dependencies
illuminate/view Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0