3.5.19 • Published 4 years ago

@crave/farmblocks-carousel v3.5.19

Weekly downloads
16
License
MIT
Repository
github
Last release
4 years ago

Farmblocks Carousel

Images carousel that changes the active item automatically from times to times. See storybook

Installation

npm install @crave/farmblocks-carousel

Usage

import React, { Component } from "react";
import { render } from "react-dom";
import Carousel from "@crave/farmblocks-carousel";

const imageSet = [
  {
    image: "https://picsum.photos/640/?image=1080",
    name: "Organic Pepper"
  },
  {
    image: "https://picsum.photos/640/?image=824",
    name: "Tomato"
  },
  {
    image: "https://picsum.photos/640/?image=889",
    name: "Grapefruit"
  }
];

const App = () => <Carousel imageSet={imageSet} />;

render(<App />, document.getElementById("root"));

API

PropertyDescriptionTypeDefault
imageSetThe image set to be displayedarrayOf({ image: string, name: string})
onChangeFunction to be called when the current image changes. It passes the image index as parameterfunction() => null
onEndFunction to be called when the last image has been displayed as activefunction() => null
itemConfigConfigs to be applied on the image cardsobject({ width: number, height: number, margin: number, fontSize: string, displayTime: number, transitionTime: number, border: { width: string, radius: string, color: string}{ width: 656, height: 328, margin: 20, fontSize: "88px", displayTime: 4, transitionTime: 2, border: { radius: "16px", width: "4px", color: "rgba(255, 255, 255, 0.56)" }}

License

MIT

3.5.19

4 years ago

3.5.18

4 years ago

3.5.15

4 years ago

3.5.14

4 years ago

3.5.13

4 years ago

3.5.12

5 years ago

3.5.11

5 years ago

3.5.10

5 years ago

3.5.9

5 years ago

3.5.8

5 years ago

3.5.7

5 years ago

3.5.6

5 years ago

3.5.5

5 years ago

3.5.4

6 years ago

3.5.3

6 years ago

3.5.2

6 years ago

3.5.1

6 years ago

3.5.0

6 years ago

3.4.3

6 years ago

3.4.2

6 years ago

3.4.1

6 years ago

3.4.0

6 years ago

3.3.3

6 years ago

3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.2.3

6 years ago

3.2.2

6 years ago

3.2.2-alpha.26

6 years ago

3.2.1

6 years ago

3.2.0

6 years ago

3.1.2-alpha.1

6 years ago

3.1.1

6 years ago

3.1.1-alpha.13

6 years ago

3.1.1-alpha.12

6 years ago

3.1.0

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.2.0

7 years ago