Journal signup with issues — Newsletter block
Pronewsletter-journal-signup-with-issues · for journal, home, article pages
Journal signup with issues
The journal has already gone out: the form beside its last issues, as proof of what arrives
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-journal-signup-with-issuesUsage
Its demo data, shortened (Using blocks).
<script setup lang="ts">
import NewsletterJournalSignupWithIssues from '@/components/trame/blocks/newsletter/newsletter-journal-signup-with-issues.vue'
const props = {
title: "The workshop journal, one issue a month",
lead: "One long read, three finds and news from the workshop. Nothing else.",
issues: [
{
id: "n41",
number: "No. 41",
title: "Repair, a matter of patience",
excerpt: "A month in the repair workshop: what comes back, what goes out, what lasts.",
image: "https://images.unsplash.com/photo-1531188929123-0cfa61e6c770?w=1600&q=80",
alt: "A hand punching holes in leather with a pricking iron",
date: "October 2, 2026",
readingTime: "9 min read"
},
{
id: "n40",
number: "No. 40",
title: "The colors of fall",
excerpt: "Four shades, discussed in daylight.",
date: "September 4, 2026",
readingTime: "6 min read"
}
],
open: "article",
submit: "subscribe",
submitLabel: "Get the journal",
consent: "Your address is only used to send you the journal. Every issue includes an unsubscribe link.",
options: {
eyebrow: "The journal",
frequency: "One issue a month",
issuesTitle: "Latest issues"
}
}
</script>
<template>
<NewsletterJournalSignupWithIssues v-bind="props" />
</template>Props
Each prop says who changes it: Words, Picture, Action, Design, Data.* required.
| Prop | Type | Description |
|---|---|---|
| title* | string | Wordswhat the reader gets by subscribing ("The workshop journal, once a month") |
| lead | string | Wordsthe promise in one or two sentences: what each issue contains |
| issues* | Issue[] | Datathe latest issues actually sent, newest first: the proof of what arrives |
| open | string | Actionthe action that opens one issue; the issue is its record |
| submit* | string | Actionthe page action that receives the address (posted by the form) |
| submitLabel* | string | Wordswhat the button does ("Get the journal") |
| consent* | string | Wordsthe purpose of the address and how to leave, as the merchant states it, next to the field |
| subscriberCount | number | Datathe number of readers, only when the merchant counts and states it |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Issue issues[] · 10 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe record’s id in the tool that answers it |
| title* | string | Wordsthe article’s title |
| excerpt | string | Wordsa sentence or two from the article |
| image | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| alt | string | Wordswhat the cover picture shows |
| section | string | Wordsthe section it belongs to, e.g. "Guides" |
| author | Author | who wrote it |
| date | string | Wordswhen it was published, as the site writes it |
| readingTime | string | Wordshow long it takes to read, e.g. "6 min" |
| number | string | Wordsthe issue’s number as the journal prints it ("No. 41") |
Author issues[].author · 6 props
| Prop | Type | Description |
|---|---|---|
| id | string | number | Datathe record’s id in the tool that answers it |
| name* | string | Wordsthe person’s name |
| role | string | Wordstheir role or job title |
| company | string | Wordswhere they work |
| avatar | string | Picturea picture: a root-relative path (/media/…) or an absolute URL |
| url | string | Designa page about them |
Options options · 6 props
| Prop | Type | Description |
|---|---|---|
| eyebrow | string | Wordswhat the journal is ("The journal") |
| frequency | string | Wordshow often it is sent, as the merchant writes it ("One issue a month") |
| issuesTitle | string | Wordsthe heading above the issues ("Latest issues") |
| status | 'success' | 'error' | Datathe answer to the last submission, when the host re-renders the page 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 |
| Link | your router’s link component |
| 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:
open,submit - Reads
articlesfrom your app
A newsletter section, for journal, home, article pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, motion, reka-ui, tailwind-merge.
More newsletter blocks
- Hub checkbox grid: a compact two-column checklist and one update button: preferences for someone who already subscribes.
- Hub picker cards: a card for each newsletter with its cadence, a tick box and a sample link, then one address field: several letters to choose from.
- Issue feed: one signup row over the stack of past issues (and the lists in a second tab): a journal that wants its archive read.
- Issue preview split preview: the merchant has a real newsletter: the form beside a card showing what an issue looks like.
- 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.