Components
Button
A link that is styled to look like a button.
Semantics: Quite often in the email world we talk about buttons, when actually
we mean links. Behind the scenes this is a <a>
tag, that is styled like a <button>
tag.
Install
Install component from your command line.
Getting started
Add the component to your email template. Include styles where needed.
import { Button } from "@react-email/components";
const Email = () => {
return (
<Button
href="https://example.com"
style={{ color: "#61dafb", padding: "10px 20px" }}
>
Click me
</Button>
);
};
Props
href
string
requiredLink to be triggered when the button is clicked
target
string
default: "_blank"Specify the target attribute for the button link
Support
All components were tested using the most popular email clients.
Gmail
Apple Mail
Outlook
Yahoo! Mail
HEY
Superhuman