Vue Email Logo
Components

Button

A link that is styled to look like a button.
Semantics: Quite often in the email world we talk about buttons, when actually we mean links. Behind the scenes this is a <a> tag, that is styled like a <button> tag.

Install

Install component from your command line.

pnpm add @vue-email/components
# or get the individual package
pnpm add @vue-email/button

Getting started

Add the component to your email template. Include styles where needed.

<script setup lang="ts">
import { Button } from '@vue-email/components'
</script>

<template>
  <Button href="https://example.com" style="color: #61dafb; padding: 10px 20px;">
    Click me
  </Button>
</template>

Props

hrefrequired
string

Link to be triggered when the button is clicked

target
string

Specify the target attribute for the button link


Copyright © 2024