Implementing Predictive Search in Theme App Extension

Hi everyone,

I’m working on integrating a predictive search component into my theme app extension and was inspired by the Shopify documentation on predictive search.

I have a couple of questions:

  • GitHub Implementations:
    Has anyone come across any existing implementations or example projects on GitHub that demonstrate a similar predictive search functionality?
  • Component Breakdown:
    What are the key components I should build for this feature? For example, I’m considering a search input with debouncing, a dynamic results dropdown, individual result items, and handling for loading and error states. Any additional recommendations or best practices would be welcome.
  • Theme Compatibility:
    Will this predictive search component work seamlessly across all themes, or is it limited to Online Store 2.0 themes? If there are compatibility concerns with legacy themes, what adjustments might be necessary?

Any insights, examples, or tips you can share would be greatly appreciated. Thanks in advance for your help!

Hey @Admin_R2decide,

most themes today already support some kind of predictive search functionality.

As Theme App Extensions use almost identical tech, I would suggest to take a look at corresponding theme code. Dawns implementation is a good start and can help you to get an idea of what you’re able to build.

Theme App Extensions work best with Online Store 2.0 themes. If you want to support legacy themes I would advise you to provide manual installation steps within your apps UI.

Hope this helps!

Kevin :hatching_chick: