Announcement
On this page
On this page
Overview
Announcements are flexible surfaces used to group information in a full width banner layout, traditionally across the top of a page. They are used to announce new features, promos, or news.
Edit element properties
import '@rhds/elements/rh-cta/rh-cta.js';
import '@rhds/elements/rh-announcement/rh-announcement.js';
<rh-announcement>
<svg slot="image" width="80" height="48" role="img" aria-label="Sample image">
<rect fill="light-dark(var(--rh-color-surface-dark, #383838), var(--rh-color-surface-light, #e0e0e0))" stroke="var(--rh-color-border-subtle)" stroke-width="2px" width="100%" height="100%" stroke-dasharray="4 4">
</rect>
<text x="17" y="30" style="font-family: var(--rh-font-family-code, RedHatMono, 'Red Hat Mono', 'Courier New', Courier, monospace); font-size: var(--rh-font-size-body-text-md, 1rem);" fill="light-dark(var(--rh-color-text-primary-on-dark, #ffffff), var(--rh-color-text-primary-on-light, #151515))">
Image
</text>
</svg>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit adipisicing elit adipisicing elit.</p>
<rh-cta slot="cta" href="#">Learn More</rh-cta>
</rh-announcement>
<link rel="stylesheet" href="../rh-announcement-lightdom-shim.css">
Sets color context for child components, overrides parent context
Make an announcement dismissable
Set the position of the image in the announcement on mobile viewports. Possible values are:
inline-start
block-start
Status
What do these mean?
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Planned
When to use
- Display an important message across many pages or page types
- Only to be implemented through the personalization program
Example of a announcement banner
Benefits
- Profile - thin design that does not push content down too much
- Lots of eyes - has the potential to be seen across many pages or page types
- Minimal elements - only body text and a call to action are required at a minimum
- Maximum visibility - spans the entire width of the browser window
- Customization - includes slots for further customization like inline or background images
- Control - if included, a close button offers a way for users to close the pattern
Status checklist
Property | Status | Meaning |
---|---|---|
Figma library |
|
Component is available in the Figma library |
RH Elements |
|
Component is available in the RH Elements repo |
RH Shared Libs |
|
Component should be added to the RH Shared Libs repo at a later date |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.
Other libraries
To learn more about our other libraries, visit the getting started page.