Socket
Socket
Sign inDemoInstall

devsgnr-carousel

Package Overview
Dependencies
15
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    devsgnr-carousel

A Simple React.js Carousel, built using styled-components.


Version published
Maintainers
1
Created

Readme

Source

:tada: A Simple Carousel built using React, Typescript and styled-components


npm npm bundle size npm NPM GitHub watchers


Table of Content

  1. Install
  2. Usage
  3. Demos
  4. Props

Install

npm

npm install devsgnr-carousel

yarn

yarn add devsgnr-carousel


Usage

Example with default props ~ customize props according to your needs, check props.

...
import Carousel from "devsgnr-carousel

const App = () => {
  const pictures: string[] = [...];

  return (
    <div className="App">
      <Carousel
        borderRadius={10}
        timeout={5000}
        autoPlay={true}
        pictures={pictures}
        height="400px"
        showThumb={false}
        thumbnailOutlineColor="#000"
        thumbnailOutlineStyle="solid"
        thumbnailOutlineOffset={1}
        thumbnailOutlineThickness={2}
        showButton={true}
        showIndicator={true}
      />
    </div>
  );
};

export default App;
Demos

Props

propsvalues
autoPlayboolean: optional? default true. set the carousel to automatically play or not
timeoutnumber: optional? default 5000. set the duration for each picture
heightstring: optional? default "100%". set the height of the carousel
picturesstring[]: required this is the pictures address
showThumbsboolean: optional? default false. when set to true shows the image thumbnails
showIndicatorsboolean: optional? default true. when set to false hides the indicators
showButtonsboolean: optional? default: true. when set to false hides buttons
thumbnailOutlineColorstring: optional? default #000. accepts hsla, rgba, rgb, and hex values
thumbnailOutlineThicknessnumber: optional? default 2. sets the thickness of the outline of the thumbnails
thumbnailOutlineStylestring: optional? default "solid". accepts "solid", "dashed", "dotted" as values
thumbnailOutlineOffsetnumber: optional? default 1. set the offset of the outline from the thumbnail, ie. how far away
borderRadiusnumber: optional? default 10. set the border-radius of the carousel

Package bundled using Rollup.js

Keywords

FAQs

Last updated on 12 Mar 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