npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

email-builder-vue

v1.0.11

Published

Vue 3 wrapper for EmailBuilder.js

Downloads

150

Readme

📦 email-builder-vue

A zero-config Vue 3 wrapper for EmailBuilder.js
Shipped offline (no CDN) – just npm i email-builder-vue.


✨ Features

  • Works in any Vue 3 project (Vite, Nuxt, Vue CLI, etc.)
  • Offline – the minified EmailBuilder.js is bundled inside
  • v-model reactive JSON ↔ HTML
  • TypeScript declarations included
  • Tree-shakable & SSR-friendly (auto-switches to client-only)

🚀 Quick start

1. Install

npm i email-builder-vue

2. Import & use

<script setup lang="ts">
import { ref } from 'vue'
import EmailBuilder from 'email-builder-vue'

// Reactive JSON state
const template = ref({
  root: {
    type: 'EmailLayout',
    data: {
      backdropColor: '#F5F5F5',
      canvasColor: '#FFFFFF',
      textColor: '#262626',
      fontFamily: 'MODERN_SANS',
      childrenIds: ['hero']
    }
  },
  hero: {
    type: 'Text',
    data: {
      style: { fontWeight: 'bold', padding: { top: 16, bottom: 16, left: 24, right: 24 } },
      props: { text: 'Hello from Vue!' }
    }
  }
})

const html = ref('')
</script>

<template>
  <EmailBuilder v-model="template" @update:html="h => html = h" />
  <pre>{{ html }}</pre>
</template>

📖 API

| Prop | Type | Default | Description | |-----------------|-----------|---------|-------------| | modelValue | object | — | Reactive JSON that EmailBuilder reads/writes. | | @update:html | event | — | Fires whenever the generated HTML changes. Payload: string | | @update:modelValue | event | — | Fires when internal JSON changes (two-way via v-model). |


🛠️ Advanced usage

Nuxt 3

The component auto-detects server-side rendering and skips loading the script on the server.

<!-- pages/index.vue -->
<template>
  <ClientOnly>
    <EmailBuilder v-model="tpl" @update:html="h => html = h" />
  </ClientOnly>
</template>

Programmatic update

template.value.root.data.canvasColor = '#000000'
// EmailBuilder re-renders automatically

Multiple instances

Each instance gets a unique id so the underlying script never collides.


🧪 Development (contributors)

# 1. Clone
git clone https://github.com/djabdou50/email-builder-vue.git
cd email-builder-vue

# 2. Install deps
npm i

# 3. Dev build (watch mode)
npm run dev

# 4. Run example
cd example-vite
npm i
npm run dev

Project layout

email-builder-vue
├─ src
│  ├─ EmailBuilder.vue   # wrapper component
│  ├─ loader.ts          # local script loader
│  └─ assets
│     └─ email-builder.min.js   # bundled 3rd-party file
└─ example-vite          # tiny playground (gitignored)

📄 License

MIT © 2025 Abdeltif bouziane


Found a bug or need React support?
Open an issue or PR!