Ruixen Pro is now live.50+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Banner Newsletter

Banner Newsletter

A newsletter banner with Inline Morphing — one pill that reshapes across input, loading, and confirmation.

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

PropTypeDefaultDescription
titlestring"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
classNamestring-Additional CSS classes