PHPackages                             malico/wired - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. malico/wired

ActiveLibrary

malico/wired
============

Livewire utilities and macros for streamlined component development

0.1.3(1mo ago)011↑718.2%MITTypeScriptPHP ^8.2

Since Mar 13Pushed 1mo agoCompare

[ Source](https://github.com/yondifon/wired)[ Packagist](https://packagist.org/packages/malico/wired)[ RSS](/packages/malico-wired/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

Wired
=====

[](#wired)

Alpine and Livewire directives for common input behaviors — slugs, case transforms, email masks, and placeholders.

Installation
------------

[](#installation)

```
composer require malico/wired
```

Register in `resources/js/app.js`:

```
import { Livewire, Alpine } from "../../vendor/livewire/livewire/dist/livewire.esm"
import { registerDirectives } from '../../vendor/malico/wired/dist/index.js'

registerDirectives(Livewire, Alpine)

Livewire.start()
```

Or register individually:

```
import { registerSlugAlpine, registerCaseAlpine } from '../../vendor/malico/wired/dist/index.js'

registerSlugAlpine(Alpine)
registerCaseAlpine(Alpine)
```

---

Directives
----------

[](#directives)

### `x-slug` / `wire:slug`

[](#x-slug--wireslug)

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`

[](#x-case--wirecase)

Watches a source property and transforms it into a specific case format. Same reactive behavior as `x-slug`.

#### Modifiers

[](#modifiers)

ModifierInputOutput`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:**

```
// In your Livewire component
public string $title = '';
public string $slug = '';
public string $className = '';
```

```

```

---

### `x-placeholders`

[](#x-placeholders)

Autocomplete for `{token}` placeholders inside a textarea. Type `{` to trigger. `ESC` to dismiss.

```

```

---

### `x-email-mask`

[](#x-email-mask)

Validates email input against two formats: a plain address (`user@example.com`) or a named address (`Name `).

```

```

---

### `wire:after`

[](#wireafter)

Runs a JS expression after a Livewire action completes. Useful for closing modals, resetting UI state, or dispatching events after form submissions.

**Default (onSuccess)** — runs after the server confirms success, skips on validation errors:

```

```

**With `.finish` modifier** — runs after DOM morph completes (regardless of validation):

```

```

The first modifier is the action name. The expression evaluates in Alpine scope, so `$flux`, `$dispatch`, `$refs` etc. all work.

**Confirmation modal example:**

```
{{ __('Confirm') }}
```

---

PHP Macros
----------

[](#php-macros)

### `$attributes->for(prefix)`

[](#attributes-forprefix)

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`:

```

    for('title') }}>{{ $title }}
    for('description') }}>{{ $description }}

```

**Parent usage:**

```

```

**Rendered output:**

```

    Getting Started
    Everything you need to know.

```

Any attribute works — not just `class`:

```

```

```
{{-- child receives each attribute stripped of its prefix --}}
for('title') }}>
{{-- renders:  --}}

for('description') }}>
{{-- renders:  --}}
```

---

Development
-----------

[](#development)

```
bun run build   # build once
bun run watch   # rebuild on change
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

50d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/96448e93b82dd289db790940e0c854f656068fd999375d6f309b4af8c2850a4e?d=identicon)[malico](/maintainers/malico)

---

Top Contributors

[![yondifon](https://avatars.githubusercontent.com/u/35140079?v=4)](https://github.com/yondifon "yondifon (7 commits)")

### Embed Badge

![Health badge](/badges/malico-wired/health.svg)

```
[![Health](https://phpackages.com/badges/malico-wired/health.svg)](https://phpackages.com/packages/malico-wired)
```

###  Alternatives

[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[glhd/aire

Modern Laravel form builder. Remembers old input, retrieves error messages and comes with beautiful Tailwind-based markup out of the box.

545265.3k7](/packages/glhd-aire)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[torchlight/torchlight-laravel

A Laravel Client for Torchlight, the syntax highlighting API.

120452.8k11](/packages/torchlight-torchlight-laravel)[konekt/html

HTML and Form Builders for the Laravel Framework

24403.2k5](/packages/konekt-html)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k1](/packages/bjuppa-laravel-blog)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
