Socket
Book a DemoInstallSign in
Socket

deku-slide

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku-slide

Carousel component for Deku

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
1
-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

deku-slide

Carousel component for Deku

Using the Swiper Slider.

Install

$ npm install --save deku-slide

Usage

import Slide from 'deku-slide';

const options = {
	breakpoints: {
		320: {
			slidesPerView: 1,
			spaceBetweenSlides: 10
		}
	},
	centeredSlides: true,
	slidesPerView: 3,
	spaceBetween: 30
};

const render = () => (
	<Slide options={options} onInit={x => console.log(x)} arrows loop pagination>
		<div><img src='http://placehold.it/960x500'/></div>
		<div><img src='http://placehold.it/960x400'/></div>
		<div><img src='http://placehold.it/960x550'/></div>
		<div><img src='http://placehold.it/960x450'/></div>
		<div><img src='http://placehold.it/960x350'/></div>
		<div><img src='http://placehold.it/960x300'/></div>
		<div><img src='http://placehold.it/960x600'/></div>
		<div><img src='http://placehold.it/960x250'/></div>
	</Slide>
);

export default {render};

Attributes

arrows

Type: boolean
Default: false

Show arrows.

class

Type: string
Default: 'Swiper'

Class to be added to the element.

duration

Type: number
Default: 3000

Delay between transitions in ms.

loop

Type: boolean
Default: false

Enable continuous loop mode.

onInit

Type: function

Function that returns initialized Swiper instance.

options

Type: object

Object with Swiper options. Available options can be found here.

pagination

Type: boolean
Default: false

Enable pagination indicators.

play

Type: boolean
Default: false

Activate autoplay.

speed

Type: number
Default: 300

Duration of transition between slides in ms.

vertical

Type: boolean
Default: false

Displays a vertical slider.

License

MIT © Andreas Gillström

Keywords

carousel

FAQs

Package last updated on 27 Nov 2017

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