All integrations

React Email

Generate, preview, and export email-safe interfaces with OpenUI's React Email component package.

How it connects to OpenUI

@openuidev/react-email provides 44 OpenUI component definitions, an emailLibrary, and prompt rules. OpenUI Lang streams into a React Email preview, which @react-email/render can convert to email-compatible HTML.

Start here

Install or scaffold

npm install @openuidev/react-email @openuidev/react-lang

Integration steps

  1. 1

    Import the email library

    Use emailLibrary from @openuidev/react-email. It covers 44 email-safe components, including headers, feature grids, pricing cards, and checkout tables.

  2. 2

    Generate the email prompt

    Build the system prompt from emailLibrary and emailPromptOptions, so the model composes emails only from those components.

  3. 3

    Preview and export HTML

    Stream the response into Renderer from @openuidev/react-lang for a live preview, then convert the email to client-compatible HTML with @react-email/render.