Contextual Save Bar

Display the contextual save bar to indicate that a form on the current page contains unsaved information, or when the users is in the process of creating a new object, such as a product or customer. The contextual save bar provides save and discard buttons to a user.

A close-up image of a Shopify admin contextual save bar. The contextual save bar displays the message: Unsaved changes. It features two buttons: a white button with the label Discard, and a green button with the label Save.

The following are ways to use the contextual save bar:

  1. Plain JavaScript
  2. React hook
  3. React component

On this page