Back to React Email

Preview

apps/docs/components/preview.mdx

0.0.15928 B
Original Source

import Support from '/snippets/support.mdx'

<Info> Email clients have this concept of “preview text” which gives insight into what's inside the email before you open. A good practice is to keep that text under 90 characters. </Info>

Install

Install component from your command line.

<CodeGroup>
sh
npm install @react-email/components -E

# or get the individual package

npm install @react-email/preview -E
sh
yarn add @react-email/components -E

# or get the individual package

yarn add @react-email/preview -E
sh
pnpm add @react-email/components -E

# or get the individual package

pnpm add @react-email/preview -E
</CodeGroup>

Getting started

Add the component to your email template. Include styles where needed.

jsx
import { Preview } from "@react-email/components";

const Email = () => {
  return <Preview>Email preview text</Preview>;
};
<Support/>