ns-ui

Announcement Bar Relay

A queued announcement bar that hands off honestly: dismissing one notice shears it upward while the next arrives from below AND the bar's own height eases between the two measured heights, so the page reflows with the message instead of snapping under it, and the queue pips physically shorten by one.

Use when Pick announcement-bar-relay when several notices have to share one page-width bar and you care that the content below doesn't jump as they hand off — it measures the next message's height before the swap and eases the bar between the two, and shows a pip row so a visitor knows how many notices are left. Pick banner-tear-stub instead for a single dismissible notice the user may want back (it leaves a reopenable stub), or toast-gravity-stack when the notices are transient and self-dismissing rather than page furniture.

Install

npx shadcn add https://design.helpmarq.com/r/announcement-bar-relay.json
View source and playground
Announcements
Team plan pricing changes on 1 September. Read the notice
Announcement 1 of 3
northbridge / console

Overview

Everything here sits under the announcement bar, so the page moves with the message instead of snapping under it when one notice hands off to the next.

Requests, 24h
1,482,309
p95 latency
142 ms
Error rate
0.04%

Props

PropTypeDefaultDescription
itemsAnnouncementItem[]The queue, front to back. Dismissed ids are skipped.
storageKeyPrefix?stringNamespaced localStorage prefix; each dismissed id is written as `${storageKeyPrefix}${id}` = "1". @default "ns-announcement-bar-relay:"
resetOnMount?booleanClear this queue's stored dismissals on mount — for demos and previews, so a replaying page can't permanently empty itself. @default false
onExhausted?() => voidFires once the last item has been dismissed and the bar has collapsed.
className?string