Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

vue-email

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-email

๐Ÿ’Œ Write email templates with Vue

  • 0.6.8
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

vue-email

๐Ÿ’Œ vue-email

npm version npm downloads license docs

Simple way to build email templates in vue.

Features

Setup

๐Ÿ“– Read the documentation

# pnpm
pnpm add -D vue-email

# npm
npm i -D vue-email

Basic Usage

๐Ÿ“– Read the documentation

// components/template-email.vue
<template>
   <e-html lang="en">
      <e-text>Hello, {{ user }}!</e-text>
      <e-hr />
      <e-button href="vuejs.org">Visit vue</e-button>
   </e-html>
</template>

<script setup>
import { EButton, EHr, EHtml, EText } from 'vue-email';
import { ref } from 'vue';
   
const user = ref('Dave');
</script>

You can see the full example here

Advanced Usage - SSR

๐Ÿ“– Read the SSR documentation

import express from "express";
import { config } from "vue-email/compiler";

const app = express();

const vueEmail = config("./templates", {
  verbose: false,
  options: {
    baseUrl: "https://vue-email-demo.vercel.app/",
  },
});

app.get("/", async function (req, res) {
  const template = await vueEmail.render("WelcomeEmail.vue", {
    props: {
      name: "John Doe",
    },
  });
  res.send(template);
});

app.listen(3000);

๐Ÿ’ป Development

  1. Clone this repository
  2. Enable Corepack using corepack enable
  3. Install dependencies using pnpm install

๐Ÿ›Ÿ Support

If you like our work, please feel to free to support us!

  • BTC: 1Bwo1Htd47rLRM4PZhydWtoC5ZAR4Fv9KZ
  • USDT: binance-qr

Contributors

Repo Activity

๐Ÿ“ Annotations

This project is inspired by react-email

License

This project is licensed under MIT

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc