Signup statement centered — Newsletter block
Pronewsletter-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-centeredUsage
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.
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat 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 |
| text | string | Wordsone or two sentences under the title: what arrives, how often |
| form* | Form | the sign-up form: where it posts and its words |
| count | Count | how many already joined: the merchant’s own figure only, hidden when absent |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Form form · 5 props
| Prop | Type | Description |
|---|---|---|
| action* | string | Actionthe host’s subscribe mutation: receives the email; the form is hidden when the page lacks it |
| placeholder | string | Wordsan example address in the field ("[email protected]") |
| button* | string | Wordswhat the button does ("Join the waitlist", "Subscribe") |
| consent | string | Wordsone small line under the field: how often, how to leave ("One email a week. Unsubscribe anytime.") |
| success | string | Wordswhat the visitor reads once in ("You’re in. The next issue lands Sunday."); the blocks’ own words when absent |
Count count · 3 props
| Prop | Type | Description |
|---|---|---|
| value* | number | the merchant’s own count, as it is: never rounded up nor invented |
| label* | string | Wordswhat the count counts, after the figure ("designers read it", "on the waitlist") |
| avatars | Avatar[] | a few of the merchant’s own subscribers who agreed to be shown; none when absent |
Avatar count.avatars[] · 2 props
| Prop | Type | Description |
|---|---|---|
| src* | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt* | string | Wordswho it is, as they agreed to be shown ("Lena, product designer"): the tooltip says it |
Options options · 1 props
| Prop | Type | Description |
|---|---|---|
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| asset | a picture’s address as your app serves it |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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.