Newsletter Signup

Newsletter subscription form

Marketing BlockContact

Overview

A self-contained email capture form. The caller provides an async onSubmit handler; the component manages all UI state transitions (idle, loading, success, error) internally. Three layout variants are available: default (inline), split (two-column with feature panel), and banner (full-width centered).

Usage

import { NewsletterSignup } from "@leanicon/web-builder-library";

Default

Minimal form with just an email input and subscribe button.

With title and description

Add title and description to provide context above the form.

Stay in the loop

Get the latest articles and news delivered to your inbox.

Add consentText to display a privacy disclaimer below the form.

Join our newsletter

Weekly insights on design, engineering, and product.

By subscribing you agree to our Privacy Policy. You can unsubscribe at any time.

Custom button label

Override the default "Subscribe" text via buttonLabel.

Stay in the loop

Get the latest articles and news delivered to your inbox.

Title only

Heading without description or consent text.

Subscribe to updates

Split

Two-column layout with a primary-colored left panel showing title, description, and feature checklist. The form sits in the right panel.

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

  • Curated industry insights every week
  • Early access to new features and tools
  • No spam — unsubscribe anytime

Split — without features

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

Split — title only

Subscribe to our newsletter

Full-width section with bg-primary background. Content and form are centered in the same container.

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

  • Curated industry insights
  • Early access to new features
  • No spam ever

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

Subscribe to our newsletter

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

By subscribing you agree to our Privacy Policy. You can unsubscribe at any time.

Dark mode

With title and description — dark mode

Stay in the loop

Get the latest articles and news delivered to your inbox.

Join our newsletter

Weekly insights on design, engineering, and product.

By subscribing you agree to our Privacy Policy. You can unsubscribe at any time.

Split — dark mode

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

  • Curated industry insights every week
  • Early access to new features and tools
  • No spam — unsubscribe anytime

Stay ahead of the curve

Join thousands of professionals who get our weekly newsletter.

  • Curated industry insights
  • Early access to new features
  • No spam ever

Props

Prop

Type

Default

Description

variant

"default" | "split" | "banner"

"default"

Layout variant

onSubmit

(email: string) => Promise<void>

—

Async callback on form submission

title

string?

—

Optional heading

description

string?

—

Optional description text

buttonLabel

string

"Subscribe"

Submit button text

consentText

string?

—

Optional privacy/consent disclaimer below input

features

string[]?

—

Feature checklist (split: left panel, banner: below form)

colorScheme

"light" | "dark"

—

Force light or dark mode

className

string

—

Additional CSS classes on root

Notes

  • On success, the form is replaced by a "Thank you for subscribing!" message.
  • Errors thrown by onSubmit are caught and displayed as destructive text below the input.
  • The button shows a spinner and "Subscribing..." text during the loading state.
  • Split variant: two-column layout with bg-primary left panel for content and bg-background right panel for the form.
  • Banner variant: full-width bg-primary section with centered content and form in a single column.
  • Feature items render with a CircleCheck icon from Lucide.
  • Dark mode: pass colorScheme="dark" or place inside a .dark ancestor.

Props

NameTypeDefaultRequiredDescription
titlestring—No
descriptionstring—No
buttonLabelstringSubscribeNo
consentTextstring—No
featuresstring[]—No
variantenumdefaultNo
onSubmit((email: string) => Promise<void>)—No
colorSchemeenum—No
classNamestring—No