Installation
Usage
import BannerNewsletter from "@/components/ruixen/banner-newsletter";
export default function MyNewsletter() {
return (
<BannerNewsletter
title="Stay in the loop"
onSubscribe={async (email) => {
await fetch("/api/subscribe", {
method: "POST",
body: JSON.stringify({ email }),
});
}}
/>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | "Stay in the loop" | Text displayed before the form |
onSubscribe | (email: string) => Promise<void> | void | - | Callback with email on form submit |
onDismiss | () => void | - | Callback fired after dismiss |
className | string | - | Additional CSS classes |

