PHPackages                             ambengers/kinetic - 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. [Templating &amp; Views](/categories/templating)
4. /
5. ambengers/kinetic

ActiveLibrary[Templating &amp; Views](/categories/templating)

ambengers/kinetic
=================

Adds view-composer like feature to Inertia.js Laravel adapter.

3.0.2(6mo ago)9064.3k↓82.1%71MITPHPPHP ~8.0.0|~8.1.0|~8.2.0|^8.3|^8.4CI passing

Since Apr 15Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/signdeck/kinetic)[ Packagist](https://packagist.org/packages/ambengers/kinetic)[ Docs](https://github.com/ambengers/kinetic)[ RSS](/packages/ambengers-kinetic/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (1)

Kinetic
=======

[](#kinetic)

A package that adds view-composer like feature to Inertia.js Laravel adapter.

Use to be able to share props based on the Inertia component name.

[![Tests](https://github.com/ambengers/kinetic/actions/workflows/tests.yml/badge.svg)](https://github.com/ambengers/kinetic/actions/workflows/tests.yml)

> **Note:** The package automatically uses Inertia.js 3.x on PHP 8.4+ and Inertia.js 2.x on older PHP versions.

Versions
--------

[](#versions)

InertiaJSKineticPHP Requirement^3.0^3.0PHP 8.4+^2.0^2.0PHP 8.0+~0.5 to ^1.01.9PHP 7.3+> "This package was created and maintained by the team behind [SignDeck — a lightweight e-signature platform for collecting documents and signatures.](https://getsigndeck.com)"

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

[](#installation)

```
composer require ambengers/kinetic
```

Usage
-----

[](#usage)

This should be very intuitive if you are already familiar on how view composers work in Laravel.

### Basic Registration

[](#basic-registration)

You can use `Inertia::composer()` in any service provider to register composers for specific components. The first argument accepts either a string or an array of Inertia components, and the second argument accepts either class string or a closure.

```
use Inertia;
use Inertia\ResponseFactory;
use App\Composers\UserComposer;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        // Class-based Composer..
        Inertia::composer('User/Profile', UserComposer::class);

        // Closure-based Composer..
        Inertia::composer('User/Profile', function (ResponseFactory $inertia) {
            //
        });
    }
}
```

### Wildcard Registration

[](#wildcard-registration)

You can also register composers to multiple components, or globally, using the wildcard `*` syntax.

```
// Components within User directory will receive data from UserComposer class
Inertia::composer('User/*', UserComposer::class);

// All components will receive data from GlobalComposer class
Inertia::composer('*', GlobalComposer::class);
```

### Class-based Composers

[](#class-based-composers)

You can generate your composer class using this command:

```
php artisan kinetic:composer UserComposer
```

Then you can call the `$inertia->with()` method within the compose method to set the composed props, like so:

```
class UserComposer
{
    public function compose(ResponseFactory $inertia)
    {
        $inertia->with('list',  ['foo' => 'bar', 'baz' => 'buzz']);
    }
}
```

### Closure-based Composers

[](#closure-based-composers)

If you opt for a closure-based composer, your closure must accept an instance of `Inertia\ResponseFactory` class as the first argument. Then you can call the `with()` method from the factory class to set the composed props like so:

```
Inertia::composer('User/Profile', function (ResponseFactory $inertia) {
    $inertia->with([
        'post' => [
            'subject' => 'Hello World!', 'description' => 'This is a description.'
         ]
    ]);
});
```

### Multiple Composers

[](#multiple-composers)

You can also set multiple composers to components using array, like so:

```
Inertia::composer(['User/Profile', 'User/Index'], [
    UserComposer::class,
    function (ResponseFactory $inertia) {
        $inertia->with(...);
    }
]);
```

The array will be automatically merged with any existing composers for the components.

When you call the `Inertia::render('User/Profile')` the props should now include the composed data.

Security
--------

[](#security)

If you discover any security related issues, please send the author an email instead of using the issue tracker.

License
-------

[](#license)

Please see the [license file](license.md) for more information.

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance66

Regular maintenance activity

Popularity43

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 86.4% 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 ~96 days

Recently: every ~74 days

Total

15

Last Release

199d ago

Major Versions

1.9 → 2.02025-02-24

2.0 → 3.02025-12-17

PHP version history (4 changes)1.2PHP ~8.0.0|~8.1.0

1.8PHP ~8.0.0|~8.1.0|~8.2.0

1.9PHP ~8.0.0|~8.1.0|~8.2.0|^8.3

3.0PHP ~8.0.0|~8.1.0|~8.2.0|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/545ea2630b623d1556d595190fc55b0a32731291629f2378c632bcf0dd3164c2?d=identicon)[ambengers](/maintainers/ambengers)

---

Top Contributors

[![ambengers](https://avatars.githubusercontent.com/u/17848299?v=4)](https://github.com/ambengers "ambengers (51 commits)")[![benjivm](https://avatars.githubusercontent.com/u/6797513?v=4)](https://github.com/benjivm "benjivm (3 commits)")[![stevebauman](https://avatars.githubusercontent.com/u/6421846?v=4)](https://github.com/stevebauman "stevebauman (3 commits)")[![dinwwwh](https://avatars.githubusercontent.com/u/64189902?v=4)](https://github.com/dinwwwh "dinwwwh (1 commits)")[![nfcrazyhun](https://avatars.githubusercontent.com/u/47859399?v=4)](https://github.com/nfcrazyhun "nfcrazyhun (1 commits)")

---

Tags

composerlaravelinertiaviewinertiajs

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/ambengers-kinetic/health.svg)

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

###  Alternatives

[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)[outhebox/laravel-translations

Manage your Laravel translations with a beautiful UI. Add, edit, delete, import, and export translations with ease.

813100.4k](/packages/outhebox-laravel-translations)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3414.1k](/packages/ycs77-inertia-laravel-ssr-head)[itstructure/laravel-grid-view

Grid view for laravel framework

2448.7k4](/packages/itstructure-laravel-grid-view)[delatbabel/viewpages

Support rendering/view of Laravel pages and templates from a database.

121.4k](/packages/delatbabel-viewpages)

PHPackages © 2026

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