---
title: Markdown
description: Converts markdown input to valid HTML for email
type: component
copyPrompt: Use for trusted markdown content inside an email. Do not pass unsanitized user input, and keep custom markdown styles sparse because they override defaults.
---
import Callout from '@mdx/Callout.astro';
import InstallTabs from '@components/docs/InstallTabs.mdx';
Converts markdown input to valid HTML for email
## Usage
Add the component to your email template. Include styles where needed.
```jsx
import { Html, Markdown } from 'jsx-email';
const Email = () => {
return (
{`# Hello, World!`}
{/* OR */}
);
};
```
## Component Props
```ts
export interface MarkdownProps {
children: string;
markdownContainerStyles?: React.CSSProperties;
markdownCustomStyles?: StylesType;
}
```
```ts
children: string | string[];
```
Contains the markdown content that will be rendered in the email template
```ts
markdownContainerStyles?: React.CSSProperties;
```
Provide custom styles for the containing div that wraps the markdown content
```ts
markdownCustomStyles?: StylesType;
```
Provide custom styles for the corresponding html element (p, h1, h2, etc.)
Note: Passing a custom style for an element overrides the default styles.