NavigationAnnouncementAction

Open in Create
Search
astronomic.dev

AnnouncementAction

Pro

For a sale or launch with one clear action: the message and a small button, side by side when there is room.

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

Examples

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

  • Static
  • Interactive
  • Framed

A sale with one button

The message and the time left at the start, a small Button in the bar's tone at the end, then the close button. Below a 42rem bar the button drops under the message. It sits above a sticky Navbar and scrolls away.

main.astro

Centered

align="center": the message, the time left and the button together in the middle; the close button stays at the end.

centered.astro

Short words on a narrow bar

shortText and shortLinkText: below a 42rem bar the short message and the short button show in one row with the close button (wrapping at the start when they do not fit), and the end words hide (the icon stays); from 42rem the long words and the time left. Resize the frame to see both.

short.astro

A long message

The message takes the room it needs and wraps; the button keeps its size at the end, and drops under the message on a narrow bar.

long.astro

Your own action

The action slot holds any component in place of the drawn button: here a Button that would open a waitlist form. href and linkText are left out, and the bar names its messageKey, as the slot is not hashed.

own-action.astro

With no script

What a visitor with no script sees, drawn with endDisplay="date" and closable="off": the end date in place of the countdown, no close button (it could do nothing), and a button that is a plain link, so it works.

no-script.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.