Socket
Socket
Sign inDemoInstall

@crave/farmblocks-carousel

Package Overview
Dependencies
102
Maintainers
6
Versions
794
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @crave/farmblocks-carousel

Images carousel


Version published
Weekly downloads
76
decreased by-89.44%
Maintainers
6
Install size
67.4 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 05 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc