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

1.2.3 • 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.

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

    Package Sidebar

    Install

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

    Weekly Downloads

    766

    Version

    1.2.3

    License

    MIT

    Unpacked Size

    23.3 kB

    Total Files

    12

    Last publish

    Collaborators

    • lukyvj
    • ejaldorau
    • haroenv
    • rayrutjes
    • jerska
    • samouss
    • therealwebby
    • francoischalifour
    • tkrugg
    • seafoox
    • sylvainh
    • lorrissaintgenez
    • broujo
    • e-krebs
    • kombucha
    • sylvain
    • crawler-team
    • amcdaid106
    • devinalgolia
    • jvenezia
    • otomatik
    • sarahdayan
    • maximehuang
    • guitek
    • matthewbond
    • shaejaz
    • cyril.descossy
    • tatsuro
    • mathougui
    • xavdh
    • agdavid
    • rasemotte
    • plnech
    • shortcuts
    • praagyajoshi
    • alphonseb
    • leodau
    • fabienmotte
    • sarahfranc
    • millotp
    • daltondickalgolia
    • dhaya.b
    • bengreenbank
    • algabet
    • alg-bgastinne
    • emmanuel.fortin
    • dylantientcheu
    • andy_ds
    • robertmogos
    • jcohonner-algolia
    • catalgolia
    • raed-algolia
    • aymeric.giraudet
    • pjankowski5312
    • valentindotxyz
    • eventexperiences_algolia
    • taylorcjohnson_algolia
    • sfaiqh
    • instantsearch-bot
    • fluf
    • leviwhalen
    • abodelot
    • mprevell97
    • jkaho
    • antoine.gilles
    • wwalser
    • bhinchley-algolia
    • louishousiaux
    • jsok_algolia
    • alg-admin
    • hugowit
    • drodriguln
    • scyganek-algolia
    • jasonberry
    • bhcastle
    • gavinwade12
    • algthomasbritton
    • vascobettencourt
    • mariaaalungu
    • cdhawke-algolia
    • felipe-bernal
    • morgan-algolia2
    • julia-francais
    • jcalgo
    • aallam.alg
    • arlnbrln
    • minjaslavkovic
    • cmarguta-algolia
    • harsharora-algolia
    • blaineventurine
    • sarahdayanalgolia
    • georgios.bourikas