New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-carousel-minimal

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-carousel-minimal

Responsive, minimal and customizable Carousel Component for React Projects.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
605
decreased by-50.89%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

Easy to use, responsive and customizable carousel component for React Projects.

Features

  • Responsive
  • Customizable
  • Infinite loop
  • Autoplay with custom duration
  • Supports text caption
  • Pause autoplay on hold
  • Slide number indicators

Usage

import './App.css';
import { Carousel } from 'react-carousel-minimal';

function App() {
  const data = [
    {
      image: "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/GoldenGateBridge-001.jpg/1200px-GoldenGateBridge-001.jpg",
      caption: "Image 1"
    },
    {
      image: "https://cdn.britannica.com/s:800x450,c:crop/35/204435-138-2F2B745A/Time-lapse-hyper-lapse-Isle-Skye-Scotland.jpg",
      caption: "Image 2"
    },
    {
      image: "https://static2.tripoto.com/media/filter/tst/img/735873/TripDocument/1537686560_1537686557954.jpg",
      caption: "Image 3"
    }
  ];

  const captionStyle = {
    fontSize: '1.5em',
    fontWeight: 'bold',
  }
  const slideNumberStyle = {
    fontSize: '20px',
    fontWeight: 'bold',
  }
  return (
    <div className="App">
      <div>
        <Carousel
          data={data}
          time={2000}
          width="600px"
          height="400px"
          captionStyle={captionStyle}
          radius="10px"
          slideNumber={true}
          slideNumberStyle={slideNumberStyle}
          captionPosition="bottom"
          style={{
            width: "fit-content",
            margin: "40px auto"
          }}
          automatic={true}
          dots={true}
        />
      </div>
    </div>
  );
}

export default App;

Props

NameValueDescription
dataarrayArray of carousel items,
containg JSON elements of the form
{
image: IMAGE_PATH,
caption: TEXT_CAPTION
}
automaticbooleanEnable auto play
timenumberInterval in milliseconds
after which it autmatically goes to
the next slide if automatic is true,
defaults to 2000
widthstringWidth of the Carousel, eg: 600px
heightstringWidth of the Carousel, eg: 400px
slideNumberbooleanEnable slide number indicators
captionStyleJSONReact style object for the captions
radiusstringBorder radius of the slides, eg: 10px
slideNumberStyleJSONReact style object for slide number indicators
captionPositionstringPosition of the text captions, available options:
top, center, bottom
dotsbooleanEnable slide indicator dots

FAQs

Package last updated on 06 Aug 2021

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc