New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

reactjs-simple-slider

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactjs-simple-slider

A simple react js image slider

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

React Simple Image Slider

A simple and reusable image slider for React (Demo)

Installation

The package can be installed via NPM:

npm i reactjs-simple-slider

Usage

Import Slider for usage :

import { Slider } from "reactjs-simple-slider";

Define your slider and config :

<Slider
  objectFit="contain"
  images={[
    "https://fakeimg.pl/200x50/",
    "https://fakeimg.pl/200x50/ff0000/",
    "https://fakeimg.pl/200x50/0000ff/",
  ]}
/>

User guide

Prop nameDescriptionDefault valueExample values
widthWidth of slider200px
heightHeight of slider500px
objectFitThe objectFit property is used to specify how an images should be resized to fit its containerundefinedfill , contain , cover , none , scale-down , undefined
imagesList of images to showstring[]{["image1", "image2", "image3"]}
leftArrowYou can customize arrow left by pass string or a react component or functionReact Component or string
rightArrowYou can customize arrow right by pass string or a react component or functionReact Component or string
infiniteLoopSet auto change slidefalsetrue , false
intervalDuration of change images slider time5000Millisecond

Keywords

react

FAQs

Package last updated on 26 Aug 2023

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