mirror of
https://github.com/resend/react-email.git
synced 2026-09-14 14:18:02 +08:00
54 lines
951 B
Plaintext
54 lines
951 B
Plaintext
---
|
|
title: "Link"
|
|
sidebarTitle: "Link"
|
|
description: "A hyperlink to web pages, email addresses, or anything else a URL can address."
|
|
"og:image": "https://react.email/static/covers/link.png"
|
|
icon: "link"
|
|
---
|
|
|
|
import Support from '/snippets/support.mdx'
|
|
|
|
## Install
|
|
|
|
Install component from your command line.
|
|
|
|
<CodeGroup>
|
|
|
|
```sh npm
|
|
npm install react-email -E
|
|
```
|
|
|
|
```sh yarn
|
|
yarn add react-email -E
|
|
```
|
|
|
|
```sh pnpm
|
|
pnpm add react-email -E
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
## Getting started
|
|
|
|
Add the component to your email template. Include styles where needed.
|
|
|
|
```jsx
|
|
import { Link } from "react-email";
|
|
|
|
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/>
|