How to build extension for cart slider

I’m building an extension for the cart slider using an embedded app extension. So far, I’ve been able to successfully display the extension inside the cart slider—but only for the Dawn theme.

Currently, I’m targeting specific IDs or class names for the cart drawer and injecting the extension manually. However, this approach is highly theme-dependent, and it’s practically impossible to account for every existing theme.

I’ve noticed that many popular upsell apps are able to showcase their extensions inside the cart slider seamlessly across all themes, and I’m curious—how are they doing this? Is there a valid or standardized way to achieve this without relying on theme-specific markup?

Any insights or best practices would be greatly appreciated!

Thanks in advance!

Hi @murgesh

As you’ve pointed out, a theme could use any ID/class name on it’s cart drawer, and Shopify does not enforce a standardised model for this. There’s some discussion here on a strategy for maintaining support for different themes. You could analyze the naming patterns for the most popular themes to see what variations exist so these can be handled by your app, and also provide a process for merchants to contact your support team if their theme is not supported.

Ok, will go through that.