CTA Button

CTA Button

Single call-to-action button with configurable label and URL.

In static .mjml templates

Use the XML include with attributes:

<!-- include: cta-button label="Direkt antworten" href="mailto:{{EMAIL}}" -->

Fragment: src/components/email/cta-button.mjml. Placeholders: {{LABEL}}, {{HREF}}.

In API (TypeScript)

import { buildMjmlCtaButton } from '~/utils/emailTemplates';
buildMjmlCtaButton({ label: 'Whitepaper herunterladen', href: absoluteDownloadUrl });

Styling

Uses css-class="button" and CSS variables --button-bg, --button-text for light/dark mode.