apps/docs/components/button.mdx
import Support from '/snippets/support.mdx'
<Info> 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. </Info>Install component from your command line.
<CodeGroup>npm install @react-email/components -E
# or get the individual package
npm install @react-email/button -E
yarn add @react-email/components -E
# or get the individual package
yarn add @react-email/button -E
pnpm add @react-email/components -E
# or get the individual package
pnpm add @react-email/button -E
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>
);
};