Building a Gmail/Outlook email preview component for Vue — DeepSeek Blog | Neura Market
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsBlogVideosGuidesCoursesCommunityTrendingGenerate
    DeepSeekBlogBuilding a Gmail/Outlook email preview component for Vue
    Back to Blog
    Building a Gmail/Outlook email preview component for Vue
    showdev

    Building a Gmail/Outlook email preview component for Vue

    Mailpeek February 20, 2026
    0 views

    If you have ever built transactional emails in a Vue app, you have probably hit the same wall. You...

    If you have ever built transactional emails in a Vue app, you have probably hit the same wall. You write the HTML, send a test, open it in Gmail, and half your styling is gone. Then you open it in Outlook and it looks like it was rendered in 2003. The React ecosystem has react.email, which gives you components, a preview server, and a whole development workflow. Vue has nothing equivalent. There is a thin wrapper around Unlayer that requires an account, an abandoned MJML builder with zero dependents on npm, and a lot of Stack Overflow threads telling you to just use Litmus. I'm on a mission to improve this workflow for Vue developers, starting with @mailpeek/preview. ## What it does It is a single Vue 3 component that renders your email HTML in an isolated iframe, simulating how Gmail and Outlook actually handle it, including their CSS restrictions. `npm install @mailpeek/preview` ```bash <script setup lang="ts"> import { EmailPreview } from '@mailpeek/preview' import '@mailpeek/preview/style.css' </script> <template> <EmailPreview :html="yourEmailHtml" /> </template> ``` You get a Gmail chrome preview, a client switcher, a mobile and desktop toggle, and metadata extraction including subject line, preheader text, and file size, all out of the box. **How the CSS filtering works** The biggest challenge was simulating what each email client actually does to your CSS. Gmail strips a surprising amount. No position, no transform, no animation, no box-shadow, no CSS Grid, no flexbox sub-properties. It also strips external stylesheets and @import rules entirely. Outlook desktop (the Word engine versions from 2016 to 2021) is worse. Everything Gmail strips, plus border-radius, display: flex, background-size, max-width, and min-width. Mailpeek processes your HTML through a CSS filter before rendering it in the iframe. If your email uses border-radius: 8px and you switch to Outlook mode, the property is stripped and a warning appears in the console: `[mailpeek] Outlook: removed "border-radius: 8px" — Outlook Word renderer does not support border-radius` The filter is regex-based with no DOM dependency, making it fully SSR-safe and compatible with Nuxt 3. The restriction lists are sourced from the Google Developers Gmail CSS documentation and caniemail.com. **What it does not do yet** It is not a replacement for Litmus or Email on Acid. It will not catch every rendering quirk, it does not simulate VML for Outlook, and it does not account for every edge case in every client version. Think of it as a linter that catches obvious issues during development rather than a screenshot testing service. Dark mode simulation for Gmail, Apple Mail, and Outlook is the next thing on the roadmap. Try it out! [Live Demo](https://mailpeek.dev/demo) · [GitHub](https://github.com/mailpeek/mailpeek) `npm install @mailpeek/preview` Zero runtime dependencies beyond Vue 3. TypeScript types included. If you build HTML emails in Vue and have thoughts on what is missing, I would love to hear them in the comments or as a GitHub issue.

    Tags

    showdevtoolingvuewebdev

    Comments

    More Blog

    View all
    How I'm using ASTs and Gemini to solve the "Codebase Onboarding" problem 🧠ai

    How I'm using ASTs and Gemini to solve the "Codebase Onboarding" problem 🧠

    Hi everyone! 👋 I’m Tara, a Senior Software Engineer and Consultant. Over the years, I've jumped...

    T
    tworrell
    Local AI Will Save Us All (The Math Says So, Trust Me)ai

    Local AI Will Save Us All (The Math Says So, Trust Me)

    Every few weeks a take goes viral in tech circles making the case for ditching cloud AI and running...

    S
    Sebastian Schürmann
    Lost in the AI Hype, I Started Smallai

    Lost in the AI Hype, I Started Small

    And it helped me get back into tech without drowning TL;DR at the end Coming back to...

    R
    Rohini Gaonkar
    Building a Replay-Tested Interactive Brokers Client in Gogo

    Building a Replay-Tested Interactive Brokers Client in Go

    I wanted an IBKR library that felt like Go and had testing I could trust. So I wrote one.

    T
    Thomas Marcelis
    Playwright in Pictures: Fully Parallel Modeplaywright

    Playwright in Pictures: Fully Parallel Mode

    Playwright’s fullyParallel mode is often treated as a simple performance switch. In practice, it...

    V
    Vitaliy Potapov
    Designing a CLI for Both Humans and Agentscli

    Designing a CLI for Both Humans and Agents

    Learn how Alpic designed its CLI for both human developers and AI agents — covering tradeoffs like polling, context windows, interactivity, and statelessness.

    J
    Julien Vallini

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.