This widget provides visitors with a search bar with search results in a overlay


The purpose for this widget is to add search capabilities to every page on your website by providing a small widget to the top of the page and provide with small set of instant search results with the possibility to expand to full results.

The integration is fully customizable and web / front-end developers can extend the widget to their needs. Different scenario's can be made by using the custom options.


The basic setup is as following:

1. Add the HTML to the top of the page where you want the search bar to be loaded.

<div id="snsearch" class="snsearch">
<form class="searchform" novalidate="novalidate" action="/search" method="get" autocomplete="off"></form>

2. Put the JavaScript part to the bottom of the page. Make sure you also include jQuery.

<script type="text/javascript">
    if (typeof window._sn === 'undefined') {
        window._sn = window._sn || [];
    if (typeof window._sn.config === 'undefined') {
        window._sn.config = {
            engineid: "-- insert your engine id --",
    if (typeof window._sn.searchboxes === 'undefined') {
        window._sn.searchboxes = window._sn.searchboxes || [];
        engineid: "-- insert your engineid --",
        type: "ExpandOnClick",
        container: "#snsearch",
        expandOnClickMobileBreakpoint: 600
<script type="text/javascript">
	(function () {
		var snloadf = function() {
			if (typeof window.__snld != "undefined") { return; }
			window.__snld = 1;
			var s = document.getElementsByTagName("script")[0];
			var b = document.createElement("script");
			b.type = "text/javascript";
			b.async = true; = "snscript";
			b.src = "//";
			s.parentNode.insertBefore(b, s);
		setTimeout(snloadf, 0);

Example: (Click on the magnifying glass)

In above set-up, we use the type "ExpandOnClick". That means that when clicking the magnify icon the search field becomes visible. On mobile devices, you can automatically switch to an expanded variant by setting the breakpoint adding the "expandOnClickMobileBreakpoint" option. This adds a CSS class ("searchine-mobile-open") to the body tag. 

Another solution is the type "Expanded". This type is useful when the search is open by default.



If the surrounding container div has the class "snsearch" then our CSS styling will be applied.
Additional styling can be added as providing normal CSS.

Custom options

Custom options can be set for translating, changing templates and overriding some of the internal functionality.

Check our documentation.