Migrate to Polaris
Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Announcement API
The API for interacting with the announcement bar.
Support
Targets (1)
Supported targets
- purchase.
thank-you. announcement. render
Supported targets
- purchase.
thank-you. announcement. render
Anchor to announcementapiAnnouncementApi
The API object provided to the purchase.thank-you.announcement.render extension target.
- Anchor to announcementannouncementannouncementAnnouncementAnnouncementrequiredrequired
Announcement
- addEventListener
Listen for events from the announcement bar.
(type: "close", cb: () => void) => void - close
Close the Announcement bar.
() => void - removeEventListener
Remove a listener for events from the announcement bar.
(type: "close", cb: () => void) => void
Was this page helpful?