0.0.5 • Published 6 years ago

react-kinda-slider v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Kinda React slider

Draft, not optimized yet

Usage

import React from 'react';
import Carousel from 'react-kinda-slider';

const Cards = ({ items = [] }) => {
  return (
    <Carousel
      infinite
      draggable
      withControls
      items={items}
      renderItem={(item, index, realIndex) => (
        <div className='card' key={realIndex}>
          <h3>{item.title}</h3>
          <p>{item.text}</p>
        </div>
      )}
      renderControl={({ canUse, onUse, type }) => (
        <button onClick={onUse} disabled={canUse}>
          {type === 'forward' ? '>' : '<'}
        </button>
      )}
    />
  );
};

Goals

  • infinite mode for "targetIndex" prop update
  • optimization (memoize calculations)
  • refactoring
  • unit-tests
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago

0.0.2

6 years ago

0.0.0

6 years ago