Countdown cutoff line — Banner block

Pro

banner-countdown-cutoff-line · for home, catalog, product, cart pages

Countdown cutoff line

The delivery promise, to the minute ("Order within 3 h 12 min for delivery on …"): the shop’s real last order time for a date

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/banner-countdown-cutoff-line

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import BannerCountdownCutoffLine from '@/components/trame/blocks/banner/banner-countdown-cutoff-line.vue'

const props = {
message: "Winter sale: up to 40% off jackets and fleeces",
deadline: "2026-11-20T05:35:00+01:00",
expiredMessage: "The winter sale is over. Thanks for stopping by!",
icon: "tag",
action: {
label: "Shop the sale",
action: "sale"
}
}
</script>

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

Props

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

PropTypeDescription
message*stringWordswhat the deadline is for, in the merchant’s words ("Winter sale: up to 40% off", "Delivery before Christmas")
deadline*stringDatathe real time the merchant set in the shop’s settings, with its offset: the end of a sale or the last order time for a delivery date; never a per-visitor or restarting timer
promisedDatestringWordsthe delivery date an order placed before the deadline gets, as the shop computes it ("Tuesday 23 December")
expiredMessagestringWordswhat the bar says once the deadline has passed ("The sale is over"); without it the bar hides
iconstringDesignan icon before the message: clock, truck, tag or gift
actionActionthe call to action: its words and the page action it runs
dismissiblebooleanfalse keeps the bar without its close button; it can be closed by default
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Action action · 2 props
PropTypeDescription
label*stringWordswhat the link does ("See the sale")
action*stringActiona named action of the page
Options options · 2 props
PropTypeDescription
asOfstringDesignthe instant the page is rendered (ISO 8601 date-time), so the server knows whether the deadline has passed; when absent the server gives the deadline in words and the browser counts once loaded
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
Linkyour router’s link component
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: action

A banner section, for home, catalog, product, cart pages; it uses @lucide/vue.

More banner blocks

  • Announcement capsule: a light rounded capsule centred at the top of the page, badge, message and a text link between hairlines: a release or a new collection that should not look like an alert.
  • Announcement docked: an app download or an upgrade: a bar fixed to the bottom of the screen, with its button.
  • Announcement floating: a pill that floats at the bottom of the page without covering the content: a short offer, dismissed easily.
  • Announcement top bar: the usual strip above the header: one sentence and a link, for a promotion or a piece of news.
  • Change notice disclosure: a price or policy change that needs up to three facts: a headline that opens a short panel.
  • Free shipping progress: the shop has a free-shipping rule: a progress bar reading the cart’s total, or the rule alone without a cart.
  • Promotional marquee: a slim band in the brand’s colour, the offer passing in a row: a short offer between two sections; the merchant’s own only.
  • Signup docked: a card docked at the foot of the screen, the full width of a phone and in a corner of a wide screen, clear of the header and its cart: an invitation that should stay in reach while the visitor reads.

All 14 banner blocks