<hk-announcement>
hk-announcement: A bar of up to six short messages that fade or scroll, optionally dismissible. Syntax, props, defaults and examples.
On this page
A bar of up to six short messages that fade or scroll, optionally dismissible.
Group: Text and media. Name in the editor: Announcement bar. Complete props for every tag: Tag reference.
Syntax
<hk-announcement />Children: None. The tag is self-closing.
Props
Write props as kebab-case attributes.
| Prop | Type | Required | Default | Allowed values | Editor label |
|---|---|---|---|---|---|
m1 | text | no | "" | max length 160 | Message 1 |
l1 | link | no | "" | - | Message 1 link |
m2 | text | no | "" | max length 160 | Message 2 |
l2 | link | no | "" | - | Message 2 link |
m3 | text | no | "" | max length 160 | Message 3 |
l3 | link | no | "" | - | Message 3 link |
m4 | text | no | "" | max length 160 | Message 4 |
l4 | link | no | "" | - | Message 4 link |
m5 | text | no | "" | max length 160 | Message 5 |
l5 | link | no | "" | - | Message 5 link |
m6 | text | no | "" | max length 160 | Message 6 |
l6 | link | no | "" | - | Message 6 link |
motion | select | no | static | static, rotate, marquee | Motion |
speed | number | no | 5 | 1 to 10 | Speed |
color | color | no | - | - | Text colour |
dismissible | boolean | no | false | - | Close button |
Required props
None. Every prop has a default or can be left out.
Examples
No example in the starter themes yet.
Limits and security
- Motion is CSS only; no script ever runs.
- Every animation is switched off for visitors who ask for reduced motion, leaving the first message.
Related tags
hk-heading: A heading with a level, size, alignment and colour.hk-text: A paragraph of plain text with size, alignment and colour.hk-rich-text: Formatted text from an HTML string, sanitized before it is rendered.hk-badge: A small label such as New or Sale, with a tone.hk-image: An image with alt text, dimensions, aspect ratio, fit, loading mode and radius.hk-icon: An icon from the built-in set, with size, stroke and an accessible label.
