@algolia/ui-components-horizontal-slider-react
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

@algolia/ui-components-horizontal-slider-react

Horizontal slider UI component for React.

Installation

yarn add @algolia/ui-components-horizontal-slider-react
# or
npm install @algolia/ui-components-horizontal-slider-react

Usage

Standalone

import { HorizontalSlider } from '@algolia/ui-components-horizontal-slider-react';

import '@algolia/ui-components-horizontal-slider-theme';

const items = [
  { objectID: '1', name: 'Item 1' },
  { objectID: '2', name: 'Item 2' },
];

function Item({ item }) {
  return (
    <pre>
      <code>{item.name}</code>
    </pre>
  );
}

function App() {
  // ...

  return <HorizontalSlider itemComponent={Item} items={items} />;
}

With Algolia Recommend

See usage for Recommend.

Props

items

RecordWithObjectID | required
type RecordWithObjectID<TItem> = TItem & {
  objectID: string;
};

The items to display in the component.

itemComponent

({ item }) => JSX.Element | required

The item component to display.

translations

HorizontalSliderTranslations
type HorizontalSliderTranslations = Partial<{
  sliderLabel: string;
  previousButtonLabel: string;
  previousButtonTitle: string;
  nextButtonLabel: string;
  nextButtonTitle: string;
}>;

The translations for the component.

classNames

HorizontalSliderClassnames
type HorizontalSliderClassnames = Partial<{
  item: string;
  list: string;
  navigation: string;
  navigationNext: string;
  navigationPrevious: string;
  root: string;
}>;

The class names for the component.

Readme

Keywords

none

Package Sidebar

Install

npm i @algolia/ui-components-horizontal-slider-react

Weekly Downloads

214

Version

1.2.2

License

MIT

Unpacked Size

23.3 kB

Total Files

8

Last publish

Collaborators

  • wwalser
  • jkaho
  • mprevell97
  • louishousiaux
  • antoine.gilles
  • eventexperiences_algolia
  • jsok_algolia
  • bhinchley-algolia
  • hugowit
  • alg-admin
  • aymeric.giraudet
  • gavinwade12
  • bhcastle
  • rishi_algolia
  • jasonberry
  • scyganek-algolia
  • drodriguln
  • abodelot
  • leviwhalen
  • sfaiqh
  • valentindotxyz
  • fluf
  • instantsearch-bot
  • taylorcjohnson_algolia
  • pjankowski5312
  • raed-algolia
  • dylantientcheu
  • catalgolia
  • morgan-algolia
  • algabet
  • andy_ds
  • bengreenbank
  • alg-bgastinne
  • daltondickalgolia
  • jcohonner-algolia
  • robertmogos
  • mariaalungu
  • emmanuel.fortin
  • ejaldorau
  • dhaya.b
  • lukyvj
  • marielaure
  • haroenv
  • rayrutjes
  • jerska
  • ronanlevesque
  • samouss
  • therealwebby
  • francoischalifour
  • jonmontane
  • tkrugg
  • seafoox
  • sylvainh
  • clemfromspace
  • lorrissaintgenez
  • broujo
  • e-krebs
  • kombucha
  • sylvain
  • crawler-team
  • amcdaid106
  • devinalgolia
  • jvenezia
  • otomatik
  • sophiem03
  • sarahdayan
  • dcoates
  • maximehuang
  • guitek
  • matthewbond
  • cyril.descossy
  • tatsuro
  • danajeremy
  • mathougui
  • xavdh
  • agdavid
  • rasemotte
  • plnech
  • shortcuts
  • praagyajoshi
  • loicsay
  • svensoldin
  • alphonseb
  • leodau
  • fabienmotte
  • sarahfranc
  • millotp