react-scroll-snap-anime-slider 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,7 @@ Works natively on touchable devices
22
22
  | **Scroll and snap** | Snap to slide's edge | :heavy_check_mark: |
23
23
  | **Free scrolling** | | :heavy_check_mark: |
24
24
  | **Scroll with touch pad** | Built-in | :heavy_check_mark: |
25
- | **Scroll with keyboard < and >** | Built-in | :clock3: |
25
+ | **Scroll with keyboard < and >** | Built-in | :heavy_check_mark: |
26
26
  | **Scroll with mouse drag** | Scroll end with inheria effect | :heavy_check_mark: |
27
27
  | **Scroll with mouse wheel** | | :x: |
28
28
  | **Navigation Buttons** | Support multiple clicks | :heavy_check_mark: |
@@ -30,6 +30,7 @@ Works natively on touchable devices
30
30
  | **Dynamic & Customizable dot group** | Can customize using [`renderDots()`](fdf) callback | :heavy_check_mark: |
31
31
  | **Bounce on boundary** | Works **ONLY** on touchable devices<br/> | :large_blue_circle: |
32
32
  | **Responsive style** | Built-in | :heavy_check_mark: |
33
+ | **Customized Style** | Can use class-name to override basic style | :heavy_check_mark: |
33
34
  | **Inifinite scrolling** | | :x: |
34
35
  | **Auto play** | You can implement it easily by using [Slider ref]() | :x: |
35
36
  | **Vertical scrolling** | Pending | :clock3: |
@@ -49,9 +50,37 @@ npm install react-scroll-snap-anime-slider
49
50
 
50
51
  ### Create a simple slider:
51
52
  ```js
52
- import { Slider, } from "react-scroll-snap-anime-slider";
53
-
54
-
53
+ import { ButtonBack, ButtonNext, Carousel, Slide, Slider, SliderBarLine } from "react-scroll-snap-anime-slider";
54
+
55
+ export function MySlider() {
56
+ let total = 20;
57
+ let visible = 3;
58
+ let step = 3;
59
+
60
+ return (
61
+ <Carousel
62
+ totalSlides={total}
63
+ visibleSlides={visible}
64
+ step={step}
65
+ >
66
+ <Slider>
67
+ {new Array(total).fill(0).map((_, i) => {
68
+ return <Slide key={i}>
69
+ <div style={{ height: "300px", border: "1px solid #ccc", textAlign: "center" }}>slider# {i}</div>
70
+ </Slide>;
71
+ })}
72
+ </Slider>
73
+
74
+ <SliderBarLine />
75
+
76
+ <div style={{ textAlign: "center" }}>
77
+ <ButtonBack>&lt;</ButtonBack>
78
+ <ButtonNext>&gt;</ButtonNext>
79
+ </div>
80
+
81
+ </Carousel>
82
+ );
83
+ }
55
84
  ```
56
85
 
57
86
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import "./scss/style.scss";
2
1
  export { Carousel } from "./lib/Carousel";
3
2
  export { Slider, } from "./lib/Slider";
4
3
  export type { IProps as ISliderProps, OnScrollProps } from "./lib/Slider";