react-email@6.2.0

resend/react-emailreact-email@6.2.0May 21, 2026by github-actions[bot]

AI Summary

Adds support for Tailwind v4 CSS-first configuration and improves the preview server's handling of dynamic imports.

Key Highlights

  • Adds `theme` and `utility` props to `<Tailwind>` for Tailwind v4 CSS-first configuration.
  • Supports Vite-style `?inline` and `?raw` suffixes for CSS imports.
  • Preview server now watches directories targeted by dynamic `import()` template literals.
  • Internal `setupTailwind` helper signature updated to accept `{ config, cssConfigs }`.

Breaking Changes

  • The `setupTailwind` helper now takes `{ config, cssConfigs }` instead of a positional `TailwindConfig`.

New Features

  • Support for Tailwind v4 CSS-first configuration.

Full Release Notes

### Minor Changes

* 192d82a: Add `theme` and `utility` props to `<Tailwind>` for Tailwind v4 CSS-first configuration. Both accept a CSS string and can be combined with the existing `config` prop.

  ```tsx
  import themeCss from "./theme.css?inline";

  <Tailwind theme={themeCss}>
    <div className="bg-brand font-display">Custom themed content</div>
  </Tailwind>;
  ```

  Empty strings are no-ops. The base Tailwind theme and utilities are still loaded — `theme` and `utility` layer on top.

  The preview server, `email export`, and the caniemail compatibility check all understand the Vite-style `?inline` and `?raw` suffixes on CSS imports, so the pattern above works the same in your project and inside the preview UI. The compatibility check also extracts the `theme` and `utility` props (in addition to `config`) when analyzing your template, so any caniemail incompatibilities in CSS produced by those props will surface as warnings.

  Internal note: the exported `setupTailwind` helper now takes `{ config, cssConfigs }` instead of a positional `TailwindConfig`. Calling it with the old shape throws with a migration hint.

### Patch Changes

* 06f1d05: Watch directories targeted by dynamic `import()` template literals so changes to runtime-resolved files trigger preview reloads.