Skip to content

feat(react-email): className on Image/Section/Column and linked Image via href - #464

Open
harold18m wants to merge 1 commit into
vercel-labs:mainfrom
harold18m:react-email-image-classname-href
Open

harold18m wants to merge 1 commit into
vercel-labs:mainfrom
harold18m:react-email-image-classname-href

Conversation

@harold18m

Copy link
Copy Markdown

Closes #461

Two gaps that forced custom overrides when building real emails:

Changes

  • className on Image, Section and Column, so a <style> media query can target them (stack columns, full-width images on mobile).
  • href on Image: when set, the image is wrapped in <Link>. Covers clickable logos and banners, which Link can't express since it only renders props.text.

New props are .nullish(), so existing specs and LLM output without them stay valid.

Tests

  • 3 new tests: classes reach the HTML, href wraps the image in <a>, a plain Image is unchanged. The first two fail without the change.
  • packages/react-email: 36/36 pass, tsc --noEmit clean.

🤖 Generated with Claude Code

… via href

Closes vercel-labs#461

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@harold18m is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
json-render-chat-sdk-demo Error Error v0 Nov 7, 2026 9:26pm UTC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

react-email: Image lacks className and there's no way to link an image

2 participants