Body
An Email Craft component for using a React `Body` component to wrap email content
Install
Install the component from your command line
console
pnpm install email-craft
pnpm install email-craft
console
bun install email-craft
bun install email-craft
console
npm install email-craft
npm install email-craft
console
yarn install email-craft
yarn install email-craft
Usage
Add the component to your email template. Include styles where needed.
jsx
import { Body, Column, Html, Section } from 'email-craft';
const Email = () => {
return (
<Html lang="en">
<Body style={{ backgroundColor: '#61dafb' }}>
<Section>
<Column style={{ width: '50%' }}>{/* First column */}</Column>
<Column style={{ width: '50%' }}>{/* Second column */}</Column>
</Section>
</Body>
</Html>
);
};
import { Body, Column, Html, Section } from 'email-craft';
const Email = () => {
return (
<Html lang="en">
<Body style={{ backgroundColor: '#61dafb' }}>
<Section>
<Column style={{ width: '50%' }}>{/* First column */}</Column>
<Column style={{ width: '50%' }}>{/* Second column */}</Column>
</Section>
</Body>
</Html>
);
};
Component Props
This component has no custom props, but expresses all of the Common Component Props for ComponentProps<'body'>
.