惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
The Last Watchdog
The Last Watchdog
TaoSecurity Blog
TaoSecurity Blog
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
H
Heimdal Security Blog
S
Security Archives - TechRepublic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
The Cloudflare Blog
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
N
News and Events Feed by Topic
E
Exploit-DB.com RSS Feed
博客园 - Franky
博客园 - 司徒正美
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
M
MIT News - Artificial intelligence
V
V2EX
Webroot Blog
Webroot Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cyberwarzone
Cyberwarzone
博客园 - 【当耐特】
月光博客
月光博客
Y
Y Combinator Blog
B
Blog RSS Feed
Recent Announcements
Recent Announcements
S
Schneier on Security
H
Hacker News: Front Page
Stack Overflow Blog
Stack Overflow Blog
NISL@THU
NISL@THU
小众软件
小众软件
雷峰网
雷峰网
P
Privacy International News Feed
腾讯CDC
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
C
Cyber Attacks, Cyber Crime and Cyber Security
V
Vulnerabilities – Threatpost
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic

Resend RSS Feed

6 Tips for Accessible Emails Welcoming Manoel do Amaral, our new Brand Designer Welcoming Michael Vaz, our new Customer Success Engineer Six Steps to Improve Your Sender Reputation Welcoming Tatira Andrade, our new Executive Assistant Welcoming Pedro Ivo Hudson, our new Design Engineer Welcoming Diel Duarte, our new Open source Engineer Welcoming Areia Spinner, our new Recruiter Resend Forward: A Conference about Craft React Email 6.0 Custom Tracking Domains AI Email Editor Introducing Automations Welcoming Ahmed Tolba, our new SRE Engineer Welcoming Aneil Singh, our new Founding Account Executive Welcoming Lucas Motta, our new Software Engineer Welcoming Trey Knowles, our new Founding Account Executive Welcoming Anxhela Carciu, our new SRE Engineer Introducing DMARC Analyzer Welcoming Evan Thibodeau, our new Customer Success Engineer Welcoming Derich Pacheco, our new Software Engineer Welcoming Alec Ventura, our new Data Engineer Welcoming Felipe Freitag, our new Software Engineer Welcoming Mateusz Wos, our new Software Engineer Incident report for February 15, 2026 Email automation for OpenClaw How to Create a DevTools Agent Skill Introducing Email Skills Why You Should Embrace the Promotions Tab Slater Smith, our new Customer Success Engineer Do You Need a Warmup Service? Welcoming Zá Scalon, our new Brand Designer How Replit Built Effortless Email Sending Features 1,000,000 users Top 10 new features in 2025 Welcoming Danilo Campos, our new Design Engineer How Dub Uses Webhooks to Power Features Incident report for November 18, 2025 Resend Forward 5: Wrap Up One More (AI) Thing React Email 5.0 Unsubscribe Topics New Contacts Experience Introducing Templates Inbound Emails $3M to Make Email Safer Hacktoberfest 2025 Four Ways to Hurt Your Sender Reputation Resend MCP Hackathon Welcoming Christina Martinez, our new Developer Experience Engineer How to read a DMARC report Welcoming Erin Levine, our new Chief of Staff How to Validate Form Inputs Engineering an AI App Welcoming Lucas da Costa, our new Software Engineer Welcoming Lucas Vieira, our new Software Engineer Resend acquires Briefer How Raycast Modernized their Email Sending How to Get Email Consent DMARC Policy Modes Welcoming Gabriel Miranda, our new Software Engineer Rebranding Resend The 7 Best Email Verification APIs for Developers How DMARC Applies to Subdomains Welcoming Pedro Gomes, our new Software Engineer Do You Need a Dedicated IP? The 6 best notification infrastructure services The Fixer Why Your Emails are Going to Spam Engineering Idempotency Keys Microsoft’s bulk sending requirements for 2025 Welcoming Rehan van der Merwe, our new Devops Engineer 400,000 users and beyond Welcoming Cassio Zen, our new Software Engineer Resend acquires Mergent How to warm up a new domain Welcoming Carolina Josephik, our new Software Engineer Launch Week: Behind the Scenes Welcoming Isabella Aquino, our new Software Engineer Resend Forward 4: Wrap Up React Email 4.0 Multiplayer Editor Broadcast API Multiple Teams new.email Public Launch Welcoming Anna Ward, our new Postmaster How Gumroad Migrated 100M Emails to Resend Welcoming João Melo, our new Software Engineer Welcoming Jp Valery, our new Customer Success Engineer What is AX (Agent Experience) and how to improve it Welcoming Pauline Chin, our new Customer Success Engineer Introducing new.email How we use Friction Logs to improve the product Top 10 Email Deliverability Tips Welcoming Giovana Yahiro, our new Designer Engineer What BIMI's Changes Mean for Email Top 10 new features in 2024 Welcoming Alexandre Cisneiros, our new Software Engineer Resend raises $18M Series A Welcoming Danilo Woznica, our new Designer Engineer
Design Engineering an X Component
Danilo Woznica · 2024-12-11 · via Resend RSS Feed

Both development and design share a common task: solving problems. As a Design Engineer, I often combine tools from both worlds to solve problems for our customers. Let's explore the process of adding a new component to Broadcasts, our no-code editor, from challenge to solution.

I'll expose my research, the thought process for developing the component, and the challenges and lessons I learned along the way.

Possibilities and Limitations

As with everything we create, we want the Broadcast editor to be second to none. The editing experience should be easy, intuitive, and as simple as writing a document.

Emails may benefit from embedded media like videos, social posts, and third-party integrations, but this media is often dynamic, while email is static.

Technical Challenge

As one example, for nearly two decades, 𝕏 (formerly Twitter) has played a key role in online communication. As a result, it has become a common practice to embed 𝕏 posts.

Since email is static, we faced the challenge of embedding something dynamic (an 𝕏 post). Given that email-safe HTML cannot embed an 𝕏 post, so we needed to find a way to convert any post to an email-friendly form.

Identifying a Solution

Stage 1: Research

We began exploring possible options and dismissed the following:

  1. Render a post-like component using email-safe HTML: While possible, building a component using email-safe HTML (i.e., tables, etc.) introduces unnecessary complexity.
  2. Capture a screenshot using JavaScript: Using a headless browser with Puppeteer or some other library, we could render an 𝕏 post using JavaScript to capture it in a screenshot. Rendering in a web engine is less reliable and requires more complexity and resource usage.
  3. Text-only render: Rending a text-only 𝕏 post wouldn't meet user expectations since it provides a degraded experience only slightly better than copy-and-paste.

Stage 2: Solution

Luckily, we found the solution using three excellent tools made by Vercel. In short, we use 𝕏 post data and dynamically create an image via a Next.js function for use in the Broadcast editor.

The three tools we used were:

  1. React Tweet: We were inspired by how react-tweet addresses the problem of rendering posts outside X's website and utilizes many of its features. These include fetching post content, layout designs, and parsing, all of which make our work easier.
  2. Next.js ImageResponse: Next.js introduces the ability to easily generate dynamic images using JSX and CSS with the ImageResponse constructor.
  3. Satori lib: Satori is a library used by Next.js ImageResponse to create images using JSX syntax. It renders our custom post UI to an SVG. The Next.js response will then capture the rendering and return a JPG.

Finally, we save the rendered JPG into the static host (S3 bucket) and embed it into the email HTML body, wrapping it with an anchor tag directed to the 𝕏 post.

What does it look like?

Key Challenges

The journey to a solution included several challenges and edge cases. These issues allowed the output to be more polished and visually closer to an 𝕏 post layout. There were a few key challenges:

1. Image Dimensions

The ImageResponse constructor receives a ReactElement and an options object, which allows you to set the width and height of the image.

Since the constructor requires passing both the element and the dimensions simultaneously, it produces a sequencing challenge, as we need to know the dimensions of the rendered image before it is rendered.

Thankfully, we found a way to predict the dimension of the image by:

  • Setting a fixed height for all known elements (e.g., profile, name, images, etc.)
  • Calculating the text height based on the number of characters

We calculate the final dimensions of the image by adding the dimensions of these elements beforehand. We then pass these calculated dimensions to the ImageResponse and the JSX to render the image.

2. Dark/light theme

Due to its special use case, the Satori library used by Next.js ImageResponse supports a limited subset of HTML and CSS. For one, it does not support css variables for switching themes. Additionally, Satori requires styling all elements with the style attribute.

We felt it was important to provide light and dark themes for maximum flexibility in the editor to match the users' content theme. We created a custom theme object to switch between themes from the Broadcast quickly.

We faced various other challenges, like supporting different screen densities, styling mentions, hashtags, links, and more, but we couldn't be happier with the final result.

Building the best editor

Sending professional, modern emails is crucial for our customers. A modern email editor should make it easy to stand out from the crowd and communicate in various formats.

We want the editor to get out of the way so you can focus on what matters most to you: connecting with your readers. We're striving to make it easy to create engaging emails, communicate your brand, and bring value to your readers.

In the future, we want to support all possible post variations, including reposts, responses, and more.

We are confident the lessons we learned while creating this component will continue to benefit you as we develop additional media types, including posts, videos, and more on other social media platforms.