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
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Recommendation from 'hawksearch-recommendations';
import fetchResult from './fetchResult.json';
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' . |