Back to React Email

Link

apps/docs/components/link.mdx

0.0.15985 B
Original Source

import Support from '/snippets/support.mdx'

Install

Install component from your command line.

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

# or get the individual package

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

# or get the individual package

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

# or get the individual package

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

Getting started

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

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

const Email = () => {
  return <Link href="https://example.com">Example</Link>;
};

Props

<ResponseField name="href" type="string" required> Link to be triggered when the button is clicked </ResponseField> <ResponseField name="target" type="string" default="_blank"> Specify the target attribute for the button link </ResponseField> <Support/>