All Projects → kimcoder → react-simple-image-slider

kimcoder / react-simple-image-slider

Licence: MIT license
simple image slider component for react

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
SCSS
7915 projects

Projects that are alternatives of or similar to react-simple-image-slider

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 (+1744.88%)
Mutual labels:  react-component, image-slider, react-slider, react-gallery
React Image Gallery
React carousel image gallery component with thumbnail support 🖼
Stars: ✭ 2,946 (+2219.69%)
Mutual labels:  react-component, image-slider
React-Express-JWT-UserPortal
React.js & Express.js User portal Using Core UI, JWT, JWT Token, Refresh Token, Role & Permission management, User manamgenet, Event Log.
Stars: ✭ 22 (-82.68%)
Mutual labels:  react-component
react-scale-text
A React library to keep an element's text scaled to fit it's container
Stars: ✭ 39 (-69.29%)
Mutual labels:  react-component
git-issue-react-electronjs
⚙️. ⚛️. A desktop application created with Electronjs and Reactjs to be cross-platform to manage and track GitHub issues.
Stars: ✭ 21 (-83.46%)
Mutual labels:  react-component
react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (-0.79%)
Mutual labels:  react-component
react-tags-input
[Not Actively Maintained] An input control that handles tags interaction with copy-paste and custom type support.
Stars: ✭ 26 (-79.53%)
Mutual labels:  react-component
Registration-and-Login-using-MERN-stack
Simple Registration and Login component with MERN stack
Stars: ✭ 210 (+65.35%)
Mutual labels:  react-component
tiny-ui
⚛️ A friendly UI component set for React.js
Stars: ✭ 202 (+59.06%)
Mutual labels:  react-component
react-ratings-declarative
A customizable rating component for selecting x widgets or visualizing x widgets
Stars: ✭ 41 (-67.72%)
Mutual labels:  react-component
react-native-slider-intro
A simple and fully customizable React Native component that implements an intro slider for your app
Stars: ✭ 80 (-37.01%)
Mutual labels:  react-component
Android-Simple-Image-Gallery
A simple implementation of an image gallery app in android
Stars: ✭ 98 (-22.83%)
Mutual labels:  image-slider
react-grid
react grid component
Stars: ✭ 17 (-86.61%)
Mutual labels:  react-component
react-ignore-rerender
🚀 Simple component for ignoring the re-rendering of a piece of React's render method.
Stars: ✭ 28 (-77.95%)
Mutual labels:  react-component
react-mason
React Masonry grid
Stars: ✭ 13 (-89.76%)
Mutual labels:  react-component
react-multiselect-two-sides
React multiselect two sides component
Stars: ✭ 15 (-88.19%)
Mutual labels:  react-component
vscode-exts
Visual Studio Code Extensions
Stars: ✭ 33 (-74.02%)
Mutual labels:  react-component
react-dates
An easily internationalizable, mobile-friendly datepicker library for the web
Stars: ✭ 12,032 (+9374.02%)
Mutual labels:  react-component
react-textarea-code-editor
A simple code editor with syntax highlighting.
Stars: ✭ 247 (+94.49%)
Mutual labels:  react-component
VOSviewer-Online
VOSviewer Online is a tool for network visualization. It is a web-based version of VOSviewer, a popular tool for constructing and visualizing bibliometric networks.
Stars: ✭ 44 (-65.35%)
Mutual labels:  react-component

react-simple-image-slider

ReactJs Download Count GitHub license

Simple ImageSlider Component for ReactJS v17

  • Just Two Elements will be used. (for display images)
  • Support GPU Render, by default.
  • Support Image Preload.
  • Support SSR. ( server-side-rendering )
  • Selectable Navigation Styles.

Live demo

Install

// npm
npm install react-simple-image-slider --save

// yarn
yarn add react-simple-image-slider

Usage

import SimpleImageSlider from "react-simple-image-slider";

const images = [
  { url: "images/1.jpg" },
  { url: "images/2.jpg" },
  { url: "images/3.jpg" },
  { url: "images/4.jpg" },
  { url: "images/5.jpg" },
  { url: "images/6.jpg" },
  { url: "images/7.jpg" },
];

const App = () => {
  return (
    <div>
      <SimpleImageSlider
        width={896}
        height={504}
        images={images}
        showBullets={true}
        showNavs={true}
      />
    </div>
  );
}

If You want to see more detail source,

Props

Name Type Required Description Default
width Number Required Image Slider Width
height Number Required Image Slider Height
images Array Required Images,
Array Elements should be like this structure,
{ url: "" } or string[]
style String Optional css object
slideDuration Number Optional css transition-duration property 0.5
navStyle Number Optional Arrow Navgation Style,
1 or 2
1
navSize Number Optional Arrow Size 50
navMargin Number Optional Arrow Margin 30
showNavs Boolean Required Toggle Arrow
startIndex Number Optional start Index of Slide 0
showBullets Boolean Required Toggle Bullets true
loop Boolean Optional looping slider true
autoPlay Boolean Optional auto play false
autoPlayDelay Boolean Optional auto play delay 2.0
useGPURender Boolean Optional Toggle GPU Render true
bgColor String Optional slider container's css background-color property #000000
onClick Function Optional Image Click Callback function,
onClick = (idx, event) => { }
idx : number : clicked bullet index (begin from 0)
onClickNav Function Optional Arrow Navigation Callback function,
onClickNav = (toRight) => { }
toRight : Boolean : slide direction
onClickBullets Function Optional Bullets Callback function,
onClickBullets = (idx) => { }
idx : Number : clicked bullet index (begin from 0)
onStartSlide Function Optional Slide Transition Start function,
onStartSlide = (idx, length) => { }
idx : Number : start index (begin from 1)
length : Number : image length
onCompleteSlide Function Optional Slide TransitionEnd Callback function,
onCompleteSlide = (idx, length) => { }
idx : Number : start index (begin from 1)
length : Number : image length

If You want to see more detail,

Style customize

  • can customize by className with !important;
.your-app {
  .rsis-container {
    // do something
  }
}

.your-app {
  .rsis-image {
    background-size: contain !important;
  }
}

Development

directory & source

  • ./example/ : demo site souce for testing component
  • ./src/ : image slider component source
  • ./dist/ : image slider component distribution
  • ./babelrc : babel configure. (version 7.x)
  • ./webpack.config.js : webpack configure. (version 4.x)
  • ./rollup.config.js : rollup configure.

scripts

// npm
npm run example         // run a test app(demo) by webpack dev server
npm run build           // build the image slider component by rollup
npm run dev     // build watch mode

// yarn
yarn example
yarn build
yarn dev

If you want to run a test app, should build before do that.

After run example by webpack dev server,
open http://localhost:8080/ in a browser

License

MIT

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