NavigationAnnouncement

Open in Create
Search
astronomic.dev

Announcement

Pro

To build your own announcement bar: one short message above the header, with a link, an optional countdown and a close button. For a ready layout, use AnnouncementText, AnnouncementAction, AnnouncementCountdown or AnnouncementSplit.

File
Announcement.astro
Group
Navigation
Kind
Interactive: inline script
Examples
2
import Announcement from "@astronomic/ui-pro/components/Announcement.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

A sale with a countdown

Astronomic's sample sale: the message, a Get the pass link, "Ends in" words that tick once a minute (the date with no script) and a close button. It sits above a sticky Navbar and scrolls away; the header sticks once it is past. Close it and reload the frame: it stays closed for the visit.

main.astro

After the end, swapped

Built between ends and expires with atEnd="swap": the build draws only the ended text, with no link and no end. A page left open past ends swaps the same way, at once and silently.

swap.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.