--- title: Settings description: >- All apps have settings merchants need to configure to control your app's behavior. For React Router-based Shopify apps, this will be defined in a route file like app.settings.jsx. api_name: app-home source_url: html: 'https://shopify.dev/docs/api/app-home/patterns/templates/settings' md: 'https://shopify.dev/docs/api/app-home/patterns/templates/settings.md' --- # Settings All apps have settings merchants need to configure to control your app's behavior. For React Router-based Shopify apps, this will be defined in a route file like `app.settings.jsx`. The settings template organizes related options into logical groups that provide contextual help alongside form controls. It also leverages the Save Bar API to protect unsaved changes from being lost. The settings pattern follows proven design guidelines that help your app feel native to the Shopify admin. See [Built for Shopify requirements](https://shopify.dev/docs/apps/launch/built-for-shopify/requirements) for more details on these guidelines. #### Use cases * Configuring app behavior and preferences * Managing notification settings and thresholds * Organizing complex options into logical groups *** ## Examples ### Configure a settings page with toggles and contextual help Merchants need to configure app behavior; the settings template groups options and protects unsaved changes. This example configures a settings page for a Product Quality Auditor app with quality criteria toggles, weight controls, and notification preferences in the main column and contextual help in the aside. Add `data-save-bar` to your form element to enable the [Save Bar API](https://shopify.dev/docs/api/app-home/apis/save-bar), which displays save/discard controls when the form has unsaved changes. ##### jsx ```tsx // @validate-ignore: Argument of type 'EventTarget | null' is not assignable to parameter of type 'HTMLFormElement | undefined', Type 'null' is not assignable to type 'HTMLFormElement | undefined', Argument of type 'FormData' is not assignable to parameter of type 'Iterable', Argument of type 'FormData' is not assignable to parameter of type 'Iterable'
{ event.preventDefault(); const formData = new FormData(event.target); const formEntries = Object.fromEntries(formData); console.log("Form data", formEntries); }} onReset={(event) => { console.log("Handle discarded changes if necessary"); }} > {/* === */} {/* Store Information */} {/* === */} US Dollar ($) Canadian Dollar (CAD) Euro (€) {/* === */} {/* Notifications */} {/* === */} Immediately Hourly digest Daily digest New order notifications Low stock alerts Customer review notifications Shipping updates {/* === */} {/* Connected accounts */} {/* === */} Puzzlify No account connected Connect By clicking Connect, you agree to accept Sample App's terms and conditions. You'll pay a commission rate of 15% on sales made through Sample App. {/* === */} {/* Preferences */} {/* === */} Shipping & fulfillment Shipping methods, rates, zones, and fulfillment preferences. Products & catalog Product defaults, customer experience, and catalog display options. Customer support Support settings, help resources, and customer service tools. {/* === */} {/* Tools */} {/* === */} Reset app settings Reset all settings to their default values. This action cannot be undone. Reset Export settings Download a backup of all your current settings. Export {/* Footer help */} Learn more about quality scoring best practices.
``` ##### html ```html Pattern
US Dollar ($) Canadian Dollar (CAD) Euro (€) Immediately Hourly digest Daily digest New order notifications Low stock alerts Customer review notifications Shipping updates Puzzlify No account connected Connect By clicking Connect, you agree to accept Sample App's terms and conditions. You'll pay a commission rate of 15% on sales made through Sample App. Shipping & fulfillment Shipping methods, rates, zones, and fulfillment preferences. Products & catalog Product defaults, customer experience, and catalog display options. Customer support Support settings, help resources, and customer service tools. Reset app settings Reset all settings to their default values. This action cannot be undone. Reset Export settings Download a backup of all your current settings. Export Learn more about quality scoring best practices.
``` ### Confirm reset with Modal API Use the [Modal API](https://shopify.dev/docs/api/app-home/apis/user-interface-and-interactions/modal-api) to confirm destructive actions like resetting all settings to their default values. ##### jsx ```tsx Reset app settings Reset all settings to their default values. This action cannot be undone. Reset Are you sure you want to reset all settings to their default values? This will clear all your customizations and cannot be undone. This will reset notification preferences, connected accounts, and all other configurations. { shopify.toast.show('Settings reset to defaults'); }} > Reset settings Cancel ``` ##### html ```html Reset app settings Reset all settings to their default values. This action cannot be undone. Reset Are you sure you want to reset all settings to their default values? This will clear all your customizations and cannot be undone. This will reset notification preferences, connected accounts, and all other configurations. Reset settings Cancel ``` ### Show save feedback with Toast API Use the [Toast API](https://shopify.dev/docs/api/app-home/apis/toast) to show feedback when settings are saved. Combine with the Save Bar API for a complete form experience. ##### jsx ```tsx // @validate-ignore: Argument of type 'EventTarget | null' is not assignable to parameter of type 'HTMLFormElement | undefined', Type 'null' is not assignable to type 'HTMLFormElement | undefined', Argument of type 'FormData' is not assignable to parameter of type 'Iterable', Argument of type 'FormData' is not assignable to parameter of type 'Iterable'
{ event.preventDefault(); const formData = new FormData(event.target); const formEntries = Object.fromEntries(formData); console.log("Form data", formEntries); shopify.toast.show('Settings saved successfully'); }} onReset={(event) => { console.log("Handle discarded changes if necessary"); }} > Immediately Hourly digest Daily digest New order notifications Low stock alerts Customer review notifications
``` ##### html ```html
Immediately Hourly digest Daily digest New order notifications Low stock alerts Customer review notifications
``` ***