Getting Started with searchstudio-UX-JS


The SearchStax Site Search solution includes a JavaScript package to help you assemble a custom search page.

Example

For a full example, see searchstudio-ux-js.

Installation

npm install --save @searchstax-inc/searchstudio-ux-js

Import

Import the Searchstax class into your code:

import Searchstax from '@searchstax-inc/searchstudio-ux-js';

Instantiation

Create a new instance of the Searchstax class:

const searchstax = new Searchstax();

Initialization

Initialize the Searchstax instance by passing a configuration object:

searchstax.initialize({
  // options
});

See the Configuration section for details on the options available.

Widgets

Add widgets by invoking the respective add methods:

searchstax.addSearchInputWidget({/* options */});
searchstax.addSearchResultsWidget({/* options */});
// etc

Refer to the Widgets section for details on each widget.

Styles

Import the default CSS styles:

@import '@searchstax-inc/searchstudio-ux-js/dist/styles/mainTheme.css';

See the Styling section for information on theming and customization.

Questions?

Do not hesitate to contact the SearchStax Support Desk.