Signup popup side sheet — Newsletter block

Free

newsletter-signup-popup-side-sheet · for home, catalog pages

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.

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-popup-side-sheet

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import NewsletterSignupPopupSideSheet from '@/components/trame/blocks/newsletter/newsletter-signup-popup-side-sheet.vue'

const props = {
title: "News from the workshop",
lead: "Get our making-of notebooks and the newest pieces.",
image: {
src: "https://images.unsplash.com/photo-1775129667571-7fa3f51c05e3?w=1600&q=80",
alt: "A desk with a candle, an open notebook and a fountain pen"
},
submit: {
label: "Get the notebook",
action: "subscribe"
},
consent: "I’d like to get news from the workshop by email.",
terms: "You can unsubscribe from any message.",
dismissLabel: "Keep browsing",
rememberLabel: "Don’t show me this sign-up again"
}
</script>

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

Props

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

PropTypeDescription
title*stringWordsthe section’s heading
leadstringWordsa sentence or two under the heading
codestringWordsthe merchant’s real fixed code
imageImagea picture beside the form
termsstringWordsthe merchant’s actual offer terms or subscription explanation
submit*Submitthe submit action: its words and the page action it runs
consentstringWordsexplicit subscription consent, never preselected
dismissLabelstringWordsthe close button’s words, instead of the block’s own
rememberLabelstringWordsthe words beside a "do not show again" box; absent: no box
statusstringWordsserver response, never inferred from a click
errorstringWordsthe host’s refusal, shown under the form
busybooleantrue: the host is sending the form; the button shows it
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Image image · 2 props
PropTypeDescription
src*stringPicturea picture: a root-relative path (/media/…) or an absolute URL
altstringWordswhat the picture shows, when the words do not say it
Submit submit · 2 props
PropTypeDescription
label*stringWordsthe words on the button or link
action*stringActionsubscribes the e-mail typed
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 home, catalog pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

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

More newsletter blocks

  • Production signup stepped: a batch in the making: the form beside its stages, with the one in progress marked — the merchant’s own only.
  • 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 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.
  • Signup statement split: the same call closing a long page or beside other content: the collage title start-aligned over two thirds, the form and the count in a card on the end side.
  • 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