Signup statement centered — Newsletter block

Pro

newsletter-signup-statement-centered · for landing, home, article pages

Signup statement centered

A newsletter, waitlist or early-access call that is the section’s whole point: the collage title very large and centred, the field and its button as one pill row, the count under it

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/newsletter-signup-statement-centered

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import NewsletterSignupStatementCentered from '@/components/trame/blocks/newsletter/newsletter-signup-statement-centered.vue'

const props = {
eyebrow: "The Margin Notes letter",
title: [
{
text: "Small"
},
{
picture: {
src: "https://images.unsplash.com/photo-1774628876934-aefd2199f733?w=400&q=80",
alt: "a sunlit desk covered in sketches"
}
}
],
text: "Every Sunday, one craft note from a working studio: a layout we rebuilt, a type pairing that held up, a critique we wish we had heard sooner.",
form: {
action: "newsletter.subscribe",
placeholder: "[email protected]",
button: "Subscribe",
consent: "One letter every Sunday. Unsubscribe in one click.",
success: "You’re in. The next letter lands on Sunday morning."
},
count: {
value: 12480,
label: "designers read it every week",
avatars: [
{
src: "https://images.unsplash.com/photo-1544005313-94ddf0286df2?w=400&q=80",
alt: "Nora, product designer"
},
{
src: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&q=80",
alt: "Theo, type designer"
}
]
}
}
</script>

<template>
<NewsletterSignupStatementCentered v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
eyebrowstringWordswhat this is, a few words ("The Sunday letter", "Early access")
title*string | (Title | Title | Title | Title | Title)[]the call, as a collage (segments: words, italic words, pills, highlighted words, up to 3 small pictures) or a plain string
textstringWordsone or two sentences under the title: what arrives, how often
form*Formthe sign-up form: where it posts and its words
countCounthow many already joined: the merchant’s own figure only, hidden when absent
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Form form · 5 props
PropTypeDescription
action*stringActionthe host’s subscribe mutation: receives the email; the form is hidden when the page lacks it
placeholderstringWordsan example address in the field ("[email protected]")
button*stringWordswhat the button does ("Join the waitlist", "Subscribe")
consentstringWordsone small line under the field: how often, how to leave ("One email a week. Unsubscribe anytime.")
successstringWordswhat the visitor reads once in ("You’re in. The next issue lands Sunday."); the blocks’ own words when absent
Count count · 3 props
PropTypeDescription
value*numberthe merchant’s own count, as it is: never rounded up nor invented
label*stringWordswhat the count counts, after the figure ("designers read it", "on the waitlist")
avatarsAvatar[]a few of the merchant’s own subscribers who agreed to be shown; none when absent
Avatar count.avatars[] · 2 props
PropTypeDescription
src*stringPicturea picture: a root-relative path (/media/…) or an absolute URL
alt*stringWordswho it is, as they agreed to be shown ("Lena, product designer"): the tooltip says it
Options options · 1 props
PropTypeDescription
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
asseta picture’s address as your app serves it
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • Subtle motion: one short reveal; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: subscribe

A newsletter section, for landing, home, article pages; it uses @lucide/vue, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More newsletter blocks

  • Release signup split date: a single dated release: its date set large, what is in it, the form beside it — the merchant’s own only.
  • Signup guide numbered: the signup deserves its rules told: the form above, the mechanics as numbered columns below — the merchant’s own only.
  • Signup popup picture beside: A picture and signup form inside the host's dialog; the merchant's own offer only.
  • Signup popup picture top: A narrow centred card whose top half is the picture, the words and the field centred under it: a strong product picture; the merchant's own offer only.
  • Signup popup side sheet: A full-height sheet at the right edge, the words and the field at the top and the picture filling the bottom: a less blocking welcome on desktop; the merchant's own offer only.
  • Signup strip: one row of words, field and button at the end of an article, asking for nothing more.
  • Strip: a tight row for the footer zone or between two sections: the promise left, the field right.
  • Waitlist full split: a pre-launch page with one strong picture: the section cut in two at full height, the form on one half and the first picture filling the other edge to edge — the merchant’s own only.

All 25 newsletter blocks