Skip to content

A React library which compliments and overrides elements of searchkit to match the CRUK Pattern Library and bring new features.

Notifications You must be signed in to change notification settings

CRUKorg/cruk-searchkit

Repository files navigation

CRUK-SEARCHKIT

Cruk-searchkit is a collection of searchkit components designed specifically for Cancer Research UK. It is written in ES6, compiled with babel using webpack. Uses Karma/Jasmine/Webpack for testing

Usage

Inside the root of you're project

npm install cruk-searchkit

then using ES6 import syntax include the desired components

import {
  CRUKSearchkitSearchBox,
  CRUKSearchkitSearchUI
} from 'cruk-searchkit';

Now you can use these React components somewhere within you're code

<SearchkitProvider searchkit={sk}>
  <CRUKSearchkitSearchBox
    id="xss-q"
    queryBuilder={MultiMatchQuery}
    queryOptions={{
      analyzer: 'cruk_standard'
    }}
    queryFields={['title', 'description']}
    placeholder="Search..."
  />
  <div className="container">
    <CRUKSearchkitSearchUI />
  </div>
</SearchkitProvider>

About

A React library which compliments and overrides elements of searchkit to match the CRUK Pattern Library and bring new features.

Resources

Stars

Watchers

Forks

Packages

No packages published