PHPackages                             brunoabpinto/vector - 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. brunoabpinto/vector

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

brunoabpinto/vector
===================

Vue reactivity in Blade templates using a familiar script setup syntax

0.0.3(3mo ago)15MITPHPPHP ^8.2

Since Feb 3Pushed 3mo agoCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

[![logo](vector.png)](vector.png)

Vector
======

[](#vector)

Vue reactivity in Blade templates using a simple `` tag.

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

[](#installation)

```
composer require brunoabpinto/vector
```

### Frontend Setup

[](#frontend-setup)

Install Vue:

```
npm install vue
```

Add Vector to your Vite entry points in `vite.config.js`:

```
export default defineConfig({
  plugins: [
    laravel({
      input: [
        "resources/css/app.css",
        "resources/js/app.js",
        "resources/js/vendor/vector.js",
      ],
      refresh: true,
    }),
  ],
  resolve: {
    alias: {
      vue: "vue/dist/vue.esm-bundler.js",
    },
  },
});
```

Add `@vectorJs` before your closing `` tag in your layout:

```

    {{ $slot }}

    @vectorJs

```

Usage
-----

[](#usage)

Use the `` tag to add Vue reactivity to your Blade templates:

```

    const i = ref(0);

    Click Me

        Count: @{{ i }}

    Success!

```

### How it works

[](#how-it-works)

1. The `` tag is transformed at compile time
2. It extracts variable declarations and auto-returns them to the template
3. Vue mounts on the **next sibling element** after the script—anything outside that element is not parsed by Vector
4. All Vue Composition API functions are available: `ref`, `reactive`, `computed`, `watch`, `onMounted`, etc.

### Escaping Blade Syntax

[](#escaping-blade-syntax)

Since Blade also uses `{{ }}`, prefix Vue's mustache syntax with `@` to prevent Blade from processing it:

```
{{-- Blade --}}
{{ $phpVariable }}

{{-- Vue (note the @) --}}
@{{ vueVariable }}
```

Or use Vue directives like `v-text`:

```

```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance81

Actively maintained with recent releases

Popularity5

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 ~0 days

Total

3

Last Release

103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/179d61df4249373d3470b1fd3222fcd5a54db6776f45202f1a1f97789e87113f?d=identicon)[brunoabpinto](/maintainers/brunoabpinto)

---

Top Contributors

[![brunoabpinto](https://avatars.githubusercontent.com/u/13052361?v=4)](https://github.com/brunoabpinto "brunoabpinto (2 commits)")

### Embed Badge

![Health badge](/badges/brunoabpinto-vector/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[livewire/blaze

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

688221.3k17](/packages/livewire-blaze)[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)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[konekt/html

HTML and Form Builders for the Laravel Framework

24403.2k5](/packages/konekt-html)

PHPackages © 2026

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