UIPackage
Menu

Framework

Change language

Boilerplate repo

Newsletter

blockmarketing

Newsletter growth quartet: a slim inline signup band, a filterable issue archive with featured spotlight, centered and split signup forms, and a split section pairing the pitch with a preview of the last issue.

Also available for React ->

Installation

$npx shadcn-vue@latest add https://uipkge.dev/r/vue/newsletter.json
Named registry:npx shadcn-vue@latest add @uipkge/newsletterInstalls to:app/components/blocks/newsletter/

Variants

Loading interactive previews…

Schema

Type aliases exported from this item's source. Use these to shape the data you pass in.

NewsletterIssue
interface NewsletterIssue {
  id: string
  issueNumber: number
  volumeDate: string
  title: string
  excerpt: string
  category: 'Architecture' | 'Design Tokens' | 'Performance' | 'Interviews'
  tags: string[]
  readTime: string
  date: string
  commentsCount: number
  likesCount: number
  featured?: boolean
}
ChannelOption
interface ChannelOption {
  id: string
  title: string
  frequency: string
  description: string
  badge: string
}

Files installed (4)

  • app/components/blocks/newsletter/NewsletterInlineBand.vue2.1 kB
    <script setup lang="ts">
    import { ref } from 'vue'
    import { Check, Mail } from 'lucide-vue-next'
    import { Badge } from '@/components/ui/badge'
    import { Button } from '@/components/ui/button'
    import { Input } from '@/components/ui/input'
    
    const email = ref('')
    const submitted = ref(false)
    
    function subscribe() {
      if (!email.value.trim()) return
      submitted.value = true
    }
    </script>
    
    <template>
      <section data-slot="newsletter-inline-band" class="border-border bg-muted/40 border-y">
        <div class="mx-auto flex max-w-6xl flex-col gap-6 px-6 py-10 lg:flex-row lg:items-center lg:gap-12">
          <div class="min-w-0 lg:flex-1">
            <div class="flex items-center gap-2">
              <Mail class="text-muted-foreground size-4" aria-hidden="true" />
              <Badge variant="secondary">Monthly</Badge>
            </div>
            <p class="mt-2.5 text-lg leading-snug font-medium text-balance">
              Engineering notes on metric modelling, access control, and warehouse cost.
            </p>
            <p class="text-muted-foreground mt-1.5 text-sm">
              Read by 8,400 data and finance engineers. One email a month, no product announcements.
            </p>
          </div>
    
          <form class="lg:w-[26rem] lg:shrink-0" @submit.prevent="subscribe">
            <div class="flex gap-2">
              <Input
                v-model="email"
                type="email"
                required
                placeholder="[email protected]"
                autocomplete="email"
                aria-label="Email address"
              />
              <Button type="submit" class="shrink-0">Subscribe</Button>
            </div>
            <!-- Status row is reserved from first paint, so confirming does not
                 nudge the band's height and shift the page under the cursor. -->
            <p class="mt-2 min-h-5 text-xs" aria-live="polite">
              <span v-if="submitted" class="text-success inline-flex items-center gap-1.5">
                <Check class="size-3" aria-hidden="true" />
                Check your inbox to confirm.
              </span>
              <span v-else class="text-muted-foreground">Unsubscribe in one click. We never share the list.</span>
            </p>
          </form>
        </div>
      </section>
    </template>
    
  • app/components/blocks/newsletter/NewsletterIssueArchive.vue20.5 kB
  • app/components/blocks/newsletter/NewsletterSignup.vue10 kB
  • app/components/blocks/newsletter/NewsletterSplitPreview.vue3.3 kB

Raw manifest:https://uipkge.dev/r/vue/newsletter.json