All Projects → ItsMrAkhil → react-styled-carousel

ItsMrAkhil / react-styled-carousel

Licence: MIT License
React styled components carousel or slide show. No external css import is required.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-styled-carousel

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 (+5478.57%)
Mutual labels:  carousel, react-carousel, react-slider
pinar
🌲☀️ Customizable, lightweight React Native carousel component with accessibility support.
Stars: ✭ 214 (+409.52%)
Mutual labels:  slider, carousel
react-spring-carousel-js
A new Carousel experience for the modern Web
Stars: ✭ 82 (+95.24%)
Mutual labels:  carousel, react-carousel
vue-piece-slider
animated slides in a fragmented look 🐞🌳✡️📐
Stars: ✭ 95 (+126.19%)
Mutual labels:  slider, carousel
angular-simple-slider
An AngularJS directive providing a simple slider functionality
Stars: ✭ 15 (-64.29%)
Mutual labels:  slider, carousel
vue-barousel
Carousel component mimics NetEase Cloud Music
Stars: ✭ 13 (-69.05%)
Mutual labels:  slider, carousel
skeleton-carousel
Carousel component. Horizontal and vertical swipe navigation
Stars: ✭ 31 (-26.19%)
Mutual labels:  slider, carousel
vue-splide
The Splide component for Vue.
Stars: ✭ 257 (+511.9%)
Mutual labels:  slider, carousel
react-carousel-minimal
React.js Responsive Minimal Carousel
Stars: ✭ 76 (+80.95%)
Mutual labels:  slider, carousel
react-flickity-component
A React.js component for using @desandro's Flickity
Stars: ✭ 258 (+514.29%)
Mutual labels:  slider, carousel
vanilla-js-carousel
Tiny (1Kb gzipped) JavaScript carousel with all the features most of us will ever need.
Stars: ✭ 87 (+107.14%)
Mutual labels:  slider, carousel
vue3-carousel
Vue 3 carousel component
Stars: ✭ 379 (+802.38%)
Mutual labels:  slider, carousel
react-instagram-zoom-slider
🌄↔️ A slider component with pinch to zoom capabilities inspired by Instagram
Stars: ✭ 67 (+59.52%)
Mutual labels:  slider, carousel
SimpleSlider
Simple responsive slider created in pure javascript.
Stars: ✭ 21 (-50%)
Mutual labels:  slider, carousel
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (+102.38%)
Mutual labels:  slider, carousel
svelte-slidy
📸 Sliding action script
Stars: ✭ 211 (+402.38%)
Mutual labels:  slider, carousel
zSlider
A pure JavaScript Carousel/Slider plugin that works well at Mobile/PC
Stars: ✭ 12 (-71.43%)
Mutual labels:  slider, carousel
Aura.ui
A Library with a lot of Controls for AvaloniaUI
Stars: ✭ 114 (+171.43%)
Mutual labels:  styled-components, slider
React Elastic Carousel
A flexible and responsive carousel component for react https://sag1v.github.io/react-elastic-carousel
Stars: ✭ 173 (+311.9%)
Mutual labels:  styled-components, carousel
scroll-snap-carousel
One more carousel plugin, but using CSS Scroll Snap and for every frameworks!
Stars: ✭ 46 (+9.52%)
Mutual labels:  slider, carousel

React Styled Slider

React Styled Slider is a react and styled component slider. It is fully configurable.

Build Status Coverage Status

Live Image

Features

  • Mostly configurable
  • Styled-Components
  • No external CSS required.
  • Server Side Rendering supported

Note: Server Side Rendering works well without the styled-components collectStyles function also. But for better user experience please use collectStyles function from styled-components

Installation

$ npm install --save react-styled-carousel

Running example in local

$ git clone github.com/itsMrAkhil/react-styled-carousel
$ npm start

It'll open localhost:9000 port, where you can see live demo.

Example

import React from 'react';
import ReactDOM from 'react-dom'
import Slider from 'react-styled-carousel';

const ExampleSlider = () => (
  <Slider>
    <h1>1</h1>
    <h1>2</h1>
    <h1>3</h1>
    <h1>4</h1>
  </Slider>
);

ReactDOM.render(<ExampleSlider />, document.getElementById('root'));

Responsive

react-styled-carousel is responsive. Below is the example configuration of responsiveness.

Note: If responsive prop is provided then, it'll override the cardsToShow prop. In other words cardsToShow will not work.

import React from 'react';
import ReactDOM from 'react-dom'
import Slider from 'react-styled-carousel';

const responsive = [
  { breakPoint: 1280, cardsToShow: 4 }, // this will be applied if screen size is greater than 1280px. cardsToShow will become 4.
  { breakPoint: 760, cardsToShow: 2 },
];

const ExampleSlider = () => (
  <Slider reponsive={responsive} >
    <h1>1</h1>
    <h1>2</h1>
    <h1>3</h1>
    <h1>4</h1>
  </Slider>
);

ReactDOM.render(<ExampleSlider />, document.getElementById('root'));

Configurable Props

Props Type Default Value Description
showArrows Boolean true If true then only Arrows of navigation will be shown
showDots Boolean true Show navigation or pagination dots below the slider
infinite Boolean true Infinitely slide cards.
Dot React Node Default Customized pagination button (Active slide Dot will get active as Boolean prop.)
DotsWrapper Styled Element Default Customized wrapper for your component to change the view of dots wrapper like position, background, etc. Note: It should be a styled ul, otherwise you may not see any Dot Components.
LeftArrow React Node Default Customized left arrow button. It'll get disabled Boolean prop if first Dot is active and infinite is false.
RightArrow React Node Default Customized right arrow button. It'll get disabled Boolean prop if last Dot is active and infinite is false.
children React Node null Cards are components which you want to show in the carousel
cardsToShow Number Children length How many cards to be shown for a single slide.
afterSlide Function null This function will be executed after every sliding is completed
beforeSlide Function null This function will be executed before starting every sliding
responsive Array null Use this for responsiveness Documentation
autoSlide Number or Boolean 2000 Used to make carousel auto slide for every given time interval. Or for 2000ms if the prop value is true.
pauseOnMouseOver Boolean true Pause auto sliding on mouse over the carousel.
hideArrowsOnNoSlides Boolean true Hide arrows if there is only one slide to show.
margin String 0px Any valid css margin value for giving margin around the slider
padding String 0px 20px Any valid css padding value for giving padding around the slider

License

MIT (Free Software, Chill Yeah!)

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].