@bridgeline-digital/react-recommendations-preview
v0.1.1
Published
Hawksearch Recommendations Preview carousel
Downloads
4
Keywords
Readme
Hawksearch Recommendation Carousel
This is a Hawksearch Recommendation carousel preview component inside a create-react-app boilerplate application
Getting Started
First, run the development server:
npm run start
Usage
npm install --save @bridgeline-digital/react-recommendations-preview
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Recommendation from 'hawksearch-recommendations';
import fetchResult from './fetchResult.json'; // JSON fetched from Hawksearch API
function DemoRecommendations () {
return (
<Recommendation items={fetchResult} slidesVisible={4} />
);
}
ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));
Props
| Name | Value | Description|
| ---- | ----- | ---------- |
| items | Array<RecommendationItem>
| List of items provided by Hawksearch Recommendation API, defaults to []
.|
| slidesVisible| 'horizontal'
, 'vertical'
| Define the direction of the slider, defaults to '3'
.|