Klevu has been positioned in the inaugural 2024 Gartner® Magic Quadrant™ for Search and Product Discovery

Klevu has been positioned in the inaugural 2024 Gartner® Magic Quadrant™ for Search and Product Discovery

Home Blog Klevu Javascript V2 Library: Everything You Need To Implement Klevu Search Within a Custom UI

Blog

Klevu Javascript V2 Library: Everything You Need To Implement Klevu Search Within a Custom UI

Contemporary e-commerce implementations come in all shapes and sizes — from traditional, all-in-one applications to more modular API-driven ones. Increasingly, developers and merchants are opting to implement their own custom User Interfaces (UIs) from scratch.

At Klevu we believe the choice of your software architecture shouldn’t impact your ability to choose the best possible on-site search engine, so we’ve got all angles covered. 

For a traditional approach to software architecture, Klevu offers plug and play extensions for Magento 1&2, Shopify and Shopify Plus and BigCommerce. These allow for quick implementation of powerful on-site search, letting merchants reap the benefits in a matter of minutes. 

For a more customized approach to development, we’re doing everything in our power to become the easiest e-commerce app to integrate seamlessly into a software agnostic architecture. This puts the flexibility back into the hands of the merchant by providing all the tools required to add Klevu to your site, regardless of how it’s been built. 

We have created a robust client-side library that provides a springboard for integrating various Klevu features to meet the needs of developers and app users: The Klevu Javascript V2 library.

This article focuses on how developers can get the most out of The Klevu Javascript V2 library.

Let’s get started….

What exactly is Klevu JSV2?

Klevu’s JSV2 library is a community-driven, open-source Javascript library that can be used to build search UIs from scratch. 

This library gives control of Klevu’s Javascript to developers and provides a more flexible approach than Klevu’s JSV1, which is fully hosted by Klevu. With full control over the source, the possibilities for integrating Klevu are endless.

What does Klevu’s JSV2 provide?

Klevu’s JSV2 currently provides developers with everything they need to integrate Klevu into a custom UI. 

It provides a set of ready to use templates for displaying the following:

  • Search auto suggestions
  • Product results in various layouts
  • Category navigation
  • Different types of facets, e.g. color, size, price sliders, date ranges and more…

And provides pipelines for:

  • Querying products
  • Non-product data
  • Products for individual category/collection pages
  • Auto suggestions
  • Popular searches 

Klevu’s JSV2 also provides a framework for extending or overriding the above built-in templates and pipelines –– there’s no limit to the extent to which Klevu can be customized.

Getting started with JSV2

Getting started with the Klevu JSV2 library is easy. You can find a quick tutorial which outlines the steps required to obtain the library and begin implementing it with your custom theme on Shopify or Shopify Plus.  

The point of the tutorial is to demonstrate a basic integration within Shopify, but it’s not designed to be a plug and play solution. It should be viewed as a library that can be used to support your theme building process. Shopify has been selected for its ease of account setup but the same can be applied to any platform. 

The tutorial provides a toolset for developers to build bespoke UIs from the ground up, without needing to worry about creating the entire Klevu integration from scratch. The library is designed to sit alongside any number of frontend applications such as:

  • Vue.js, 
  • ReactJS 
  • AngularJS 

The tutorial provides a more advanced feature set than the JSV1 library so early adopters will feel the benefit from switching to JSV2, even if a separate frontend application is not in use.

We’re continuing to roll out new features to the library over the upcoming months, so watch this space!

Summary

As a developer or digital agency, there are a number of benefits to adopting the JSV2 library early. You’ll have complete control over Klevu’s Javascript which will give you the freedom to override or manipulate the implementation but more importantly, it will provide a framework for building bespoke search UIs.

So go ahead and grab a copy of the tutorial and see how easily Klevu’s JSV2 library can support your latest e-commerce project.

Please feel free to provide any feedback on our Beta Javascript V2 Library by contacting us at support@klevu.com. You will help us to improve our framework and features to support the e-commerce developer community to implement the best on-site search.

Related articles