Skip to main content

Migrate ThemeProvider from Polaris React

Polaris web components have no ThemeProvider equivalent. Their appearance comes from the Shopify admin shell and the loaded Polaris web-components library, not from an app-owned wrapper.


Render migrated descendants directly and delete ThemeProvider once nothing still depends on its React context. Keep unrelated app context providers that continue to own application behavior.

Migrate theme-dependent custom CSS separately. Replace Polaris React token references with supported app styling, and verify contrast and behavior in Shopify admin rather than recreating a per-subtree Polaris theme.

Don't remove @shopify/polaris while another component still imports it. Test the workflows that used the wrapper, including overlays and focus behavior, before removing the package-level setup.


Was this page helpful?