Link
Renders a hyperlink to an external resource
Install
Install the component from your command line
console
pnpm add jsx-emailpnpm add jsx-emailconsole
bun add jsx-emailbun add jsx-emailconsole
npm add jsx-emailnpm add jsx-emailconsole
yarn add jsx-emailyarn add jsx-emailUsage
Add the component to your email template. Include styles where needed.
jsx
import { Link } from 'jsx-email';
const Email = () => {
return <Link href="https://example.com">Example</Link>;
};import { Link } from 'jsx-email';
const Email = () => {
return <Link href="https://example.com">Example</Link>;
};Component Props
ts
disableDefaultStyle?: boolean;disableDefaultStyle?: boolean;If true, instructs the component not to add default style properties to the component. This can be useful when attempting to override default styles with Tailwind or class names.
ts
href: string;href: string;Link to be triggered when the button is clicked.
ts
target?: string;target?: string;Specify the target attribute for the button link.
TIP
This component also expresses all of the Common Component Props for ComponentProps<'a'>.