All Projects → erichbehrens → React Animated Slider

erichbehrens / React Animated Slider

Licence: mit
Animated slider/carousel component for react

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Animated Slider

Croperino
📷 A simple image cropping tool that provides gallery or camera help for Native Android (Java)
Stars: ✭ 176 (-23.14%)
Mutual labels:  gallery
Anfora
🏺 Self-hosted photo gallery social network. Under development
Stars: ✭ 197 (-13.97%)
Mutual labels:  gallery
Googliser
a fast BASH multiple-image downloader
Stars: ✭ 202 (-11.79%)
Mutual labels:  gallery
Recent Images
Do you noticed the new feature of Telegram or Instagram?! They show your latest images when you try to attach or post a picture. So I developed this library the same with lots of customization. Simple way to get all images of device based on date taken, name, id and other customization
Stars: ✭ 182 (-20.52%)
Mutual labels:  gallery
Qp Gallery Releases
QuickPic Gallery Mod
Stars: ✭ 187 (-18.34%)
Mutual labels:  gallery
Gallery shell
📷 Bash Script to generate static responsive image web galleries.
Stars: ✭ 198 (-13.54%)
Mutual labels:  gallery
Posse gallery
Posse's fancy new gallery for Flutter.
Stars: ✭ 174 (-24.02%)
Mutual labels:  gallery
Album
🍉 Album and Gallery for Android platform.
Stars: ✭ 2,430 (+961.14%)
Mutual labels:  gallery
Ios Nbuimagepicker
Modular image picker with Simulator-compatible AVFondation camera, assets library, filters and more.
Stars: ✭ 196 (-14.41%)
Mutual labels:  gallery
React Slideshow
A react component for slideshow supporting slide, fade and zoom
Stars: ✭ 201 (-12.23%)
Mutual labels:  gallery
Overlap Image Gallery View
OverlapImageGalleryView with different animations. Sample for android mobile application.
Stars: ✭ 188 (-17.9%)
Mutual labels:  gallery
Ubergallery
An easy to use, simple to manage, web photo gallery written in PHP.
Stars: ✭ 189 (-17.47%)
Mutual labels:  gallery
Qml Creative Controls
QML controls for creative applications and creative coding
Stars: ✭ 199 (-13.1%)
Mutual labels:  gallery
Sharex Upload Server
AKA ShareS - Feature full & Stable ShareX and file server in node. Includes images, videos, code, text, markdown rendering, password protected uploads, logging via discord, administration through Discord, url shortening, and a full front end. Use standalone or via reverse proxy
Stars: ✭ 180 (-21.4%)
Mutual labels:  gallery
Bit
A tool for component-driven application development.
Stars: ✭ 14,443 (+6206.99%)
Mutual labels:  reactjs-components
React Awesome Slider
React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. 🖥️ 📱
Stars: ✭ 2,343 (+923.14%)
Mutual labels:  gallery
Silentbox
A lightbox inspired Vue.js component.
Stars: ✭ 196 (-14.41%)
Mutual labels:  gallery
Ownphotos
Self hosted alternative to Google Photos
Stars: ✭ 2,587 (+1029.69%)
Mutual labels:  gallery
Prosopopee
a static website generator to make beautiful customizable pictures galleries that tell a story
Stars: ✭ 207 (-9.61%)
Mutual labels:  gallery
Ptimagealbumviewcontroller
"Image Album" — or "Photo Album" if you like that better — View( Controller) for all crazy iOS developers out there...
Stars: ✭ 199 (-13.1%)
Mutual labels:  gallery

react-animated-slider

npm version downloads Greenkeeper badge CircleCI dependencies devDependencies minified size minified + gzipped size

A Slider/Carousel component for React supporting custom css animations.

Demo - Codesandbox Playground

Preview

Features

  • Ready to use slider component with animations
  • Easy customization
  • Horizontal or vertical navigation
  • Swipe navigation on touch devices
  • Infinite slider
  • Autoplay
  • Supports any element as children
  • Clean DOM without dirty manipulations
  • Support for CSS modules
  • Works with SSR
  • Works on IE11

Install

npm install react-animated-slider

Note: this component relies on getDerivedStateFromProps and requires [email protected] or newer. For older react versions please install react-animated-slider version 1:

npm install [email protected]^1

Most Simple Use

import Slider from 'react-animated-slider';
import 'react-animated-slider/build/horizontal.css';

const slides = [
  { title: 'First item', description: 'Lorem ipsum'}
  { title: 'Second item', description: 'Lorem ipsum'}
];

<Slider>
  {slides.map((slide, index) => <div key={index}>
    <h2>{slide.title}</h2>
    <div>{slide.description}</div>
  </div>)}
</Slider>

Properties

property type default description
slideIndex number 0 Index of the slide that will be initially displayed.
duration number 2000(ms) Duration of the animation in milliseconds. It is used to remove the animateIn and animateOut classNames and assign current after the transition has completed.
disabled boolean false Disable slider navigation
infinite boolean true Enable or disable infinite loop through slides. Sliders with only 2 children will have this option set to false
autoplay number undefined Autoplay interval in miliseconds. If undefined the slider will not play automatically. The timer will be paused and reset during user interactions such as mouse over or touch, to avoid sliding away the elements when the user wants to click them.
touchDisabled boolean false Disable slider navigation through touch events
minSwipeOffset number 15(px) Minimum distance in pixels to swipe for triggering a navigation event
previousButton ReactElement arrow svg Will be rendered inside the previous button
nextButton ReactElement arrow svg Will be rendered inside the next button
classNames object see below Object representing the CSS classNames that will be apllied to the slides.
{
  slider: 'slider',
  previousButton: 'previousButton',
  nextButton: 'nextButton',
  buttonDisabled: 'disabled',
  track: 'track',
  slide: 'slide',
  hidden: 'hidden',
  previous: 'previous',
  current: 'current',
  next: 'next',
  animateIn: 'animateIn',
  animateOut: 'animateOut',
}

Classnames

class description
slider element wrapping the whole Slider
previousButton previous button
nextButton next button
buttonDisabled disabled state for previous and next button
track element wrapping all slides
slide apllied to every child item
hidden a slide that is not visible and is not adjacent to the current slide, therefore no animation will be applied
previous the slide that will appear or is appearing when the slider navigated back
next the slide that will appear or is appearing when the slider navigated forward
animateIn the slide moving into the view
animateOut the slide moving out of the view

Events

property description
onSlideChange called after a slide change animation has ended. Receives an object with the new slide index as argument:
<Slider onSlideChange={event => console.log(event.slideIndex)}>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].