Production signup stepped — Newsletter block
Pronewsletter-production-signup-stepped · for landing, home pages
Production signup stepped
A batch in the making: the form beside its stages, with the one in progress marked — the merchant’s own only.
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-production-signup-steppedUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import NewsletterProductionSignupStepped from '@/components/trame/blocks/newsletter/newsletter-production-signup-stepped.vue'
const props = {
title: "Your batch is being made",
lead: "Leave your email: we send one message on opening day, so you can order before the public launch.",
submitLabel: "Notify me",
consent: "Your email is used only for this reminder and is deleted after the launch.",
joinAction: "waitlist.join",
steps: [
{
label: "Fabric received",
state: "done",
date: "September 2"
},
{
label: "Cut",
state: "done",
date: "September 16"
}
],
options: {
stepsTitle: "Where the batch stands"
}
}
</script>
<template>
<NewsletterProductionSignupStepped v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the visitor is waiting for ("The next drop arrives in November") |
| lead | string | Wordsone or two sentences on what joining gives: first access, a reminder, nothing else |
| submitLabel* | string | Wordswhat the button does ("Notify me") |
| consent | string | Wordsthe purpose of the address and the right to leave, as the merchant states it, under the field |
| joinAction* | string | Actionthe page action that receives the address (posted by the form) |
| count | string | Wordshow many people already joined, only when the merchant states a real figure |
| steps* | Step[] | the steps shown, in order |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Step steps[] · 3 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Wordsthe stage ("Coupe") |
| state* | 'done' | 'current' | 'next' | Datawhere the batch is, from the merchant’s own data |
| date | string | Wordsits date or due date, as written |
Options options · 5 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordsa short line above the title ("Early access") |
| stepsTitle | string | Wordsthe heading above the steps ("Where the batch stands") |
| status | 'success' | 'error' | Datathe answer to the last submission, when the host re-renders with it |
| statusText | string | Wordswhat that answer says |
| 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 |
| 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 pages; it uses @lucide/vue, @vueuse/core, 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
- Latest issue signup cover card: the latest issue shown as a cover card beside the form: one strong issue to sell the next ones.
- Letter archive collage: an intro with a collage of the merchant’s pictures and the form, a sample archive beside it: one letter with a real history.
- Letter signup signed: a letter written by one person: their note and their face beside the form, for an editorial tone.
- Pictured signup: editorial or lifestyle shops: a picture the full height of the block, the form on its other side.
- 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.