--- title: ui-save-bar description: >- The Save Bar API is used to indicate that a form on the current page has unsaved information. It can be controlled declaratively through the `ui-save-bar` element. api_name: app_home source_url: html: 'https://shopify.dev/docs/api/app-home/app-bridge-web-components/ui-save-bar' md: >- https://shopify.dev/docs/api/app-home/app-bridge-web-components/ui-save-bar.txt --- # ui-save-bar The Save Bar API is used to indicate that a form on the current page has unsaved information. It can be controlled declaratively through the `ui-save-bar` element. ## ui-save-bar element The `ui-save-bar` element is available for use in your app. It configures a save bar to display in the Shopify Admin. You can provide HTML ` ``` ## Preview ![](https://shopify.dev/images/templated-apis-screenshots/admin/app-bridge-web-components/contextual-save-bar.png) ## Examples Save bar options, variations, and events ### Save bar controlled by the ui-save-bar element Show the save bar Control the save bar through show and hide instance methods Setting the loading state of the Save and Discard buttons Setting the loading state of the Save and Discard buttons Setting the disabled state of the Save and Discard buttons Setting the disabled state of the Save and Discard buttons Showing a discard confirmation modal Set the `discardConfirmation` attribute on the `ui-save-bar` element to show a confirmation modal after the user clicks the Discard button of the save bar ### Examples * #### Show the save bar ##### Description Control the save bar through show and hide instance methods ##### Default ```html ``` * #### Setting the loading state of the Save and Discard buttons ##### Description Setting the loading state of the Save and Discard buttons ##### Default ```html ``` * #### Setting the disabled state of the Save and Discard buttons ##### Description Setting the disabled state of the Save and Discard buttons ##### Default ```html ``` * #### Showing a discard confirmation modal ##### Description Set the \`discardConfirmation\` attribute on the \`ui-save-bar\` element to show a confirmation modal after the user clicks the Discard button of the save bar ##### Default ```html ``` ## Related [![](https://shopify.dev/images/icons/32/pickaxe-1.png)![](https://shopify.dev/images/icons/32/pickaxe-1-dark.png)](https://shopify.dev/docs/api/app-bridge-library/apis/save-bar) [APIsSave Bar](https://shopify.dev/docs/api/app-bridge-library/apis/save-bar) [![](https://shopify.dev/images/icons/32/pickaxe-1.png)![](https://shopify.dev/images/icons/32/pickaxe-1-dark.png)](https://shopify.dev/docs/api/app-bridge-library/react-components/savebar-component) [React componentsSaveBar Component](https://shopify.dev/docs/api/app-bridge-library/react-components/savebar-component)