Newsletter Signup
Newsletter subscription form
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.
With consent text
Add consentText to display a privacy disclaimer below the form.
Join our newsletter
Weekly insights on design, engineering, and product.
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
Banner
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
Banner — without features
Stay ahead of the curve
Join thousands of professionals who get our weekly newsletter.
Banner — title only
Subscribe to our newsletter
Banner — with consent text
Stay ahead of the curve
Join thousands of professionals who get our weekly newsletter.
Dark mode
With title and description — dark mode
Stay in the loop
Get the latest articles and news delivered to your inbox.
With consent text — dark mode
Join our newsletter
Weekly insights on design, engineering, and product.
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
Banner — dark mode
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 |
|---|---|---|---|
|
|
| Layout variant |
|
| — | Async callback on form submission |
|
| — | Optional heading |
|
| — | Optional description text |
|
|
| Submit button text |
|
| — | Optional privacy/consent disclaimer below input |
|
| — | Feature checklist (split: left panel, banner: below form) |
|
| — | Force light or dark mode |
|
| — | Additional CSS classes on root |
Notes
- On success, the form is replaced by a "Thank you for subscribing!" message.
- Errors thrown by
onSubmitare 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-primaryleft panel for content andbg-backgroundright panel for the form. - Banner variant: full-width
bg-primarysection with centered content and form in a single column. - Feature items render with a
CircleCheckicon from Lucide. - Dark mode: pass
colorScheme="dark"or place inside a.darkancestor.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
title | string | — | No | |
description | string | — | No | |
buttonLabel | string | Subscribe | No | |
consentText | string | — | No | |
features | string[] | — | No | |
variant | enum | default | No | |
onSubmit | ((email: string) => Promise<void>) | — | No | |
colorScheme | enum | — | No | |
className | string | — | No |