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(4mo ago)16MITPHPPHP ^8.2

Since Feb 3Pushed 4mo agoCompare

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

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 75% of packages

Maintenance74

Regular maintenance activity

Popularity8

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

149d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13052361?v=4)[Bruno Pinto](/maintainers/brunoabpinto)[@brunoabpinto](https://github.com/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.6M3.1k](/packages/craftcms-cms)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[illuminate/view

The Illuminate View package.

13047.0M2.2k](/packages/illuminate-view)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)[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.

45444.2k1](/packages/pressbooks-pressbooks)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)

PHPackages © 2026

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