Socket
Book a DemoInstallSign in
Socket

@crave/farmblocks-carousel

Package Overview
Dependencies
Maintainers
6
Versions
794
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crave/farmblocks-carousel

Images carousel

3.5.19
latest
Source
npmnpm
Version published
Weekly downloads
20
-87.58%
Maintainers
6
Weekly downloads
 
Created
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

farmblocks

FAQs

Package last updated on 05 Jan 2022

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.