Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jossmac/react-images
🌄 A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS
https://github.com/jossmac/react-images
carousel lightbox-component modal-dialogs react responsive
Last synced: 5 days ago
JSON representation
🌄 A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS
- Host: GitHub
- URL: https://github.com/jossmac/react-images
- Owner: jossmac
- License: mit
- Created: 2015-09-09T23:57:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-20T20:03:02.000Z (8 months ago)
- Last Synced: 2024-12-31T03:07:49.576Z (12 days ago)
- Topics: carousel, lightbox-component, modal-dialogs, react, responsive
- Language: JavaScript
- Homepage: http://jossmac.github.io/react-images
- Size: 11.7 MB
- Stars: 2,344
- Watchers: 42
- Forks: 440
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-components-all - react-images - A simple lightbox component for displaying an array of images. (Uncategorized / Uncategorized)
- awesome-list - react-images - A simple lightbox component for displaying an array of images. (Demos / Photo / Image)
- awesome-react-components - react-images - A simple lightbox component for displaying an array of images. (UI Components / Photo / Image)
- awesome-react-components - react-images - A simple lightbox component for displaying an array of images. (UI Components / Photo / Image)
README
# React Images
### ⚠️ Warning!
**Don't use this in a new project.** This package hasn't been properly maintained in a long time and there are much better options available.
**Instead, try...**
- [React Responsive Carousel](http://react-responsive-carousel.js.org/)
---
A mobile-friendly, highly customizable, carousel component for displaying media in ReactJS.
### Browser support
Should work in every major browser... maybe even IE10 and IE11?
### Getting Started
Start by installing `react-images`
```bash
npm install react-images
```or
```bash
yarn add react-images
```**If you were using `0.x` versions:** library was significantly rewritten for `1.x` version and contains several breaking changes.
The best way to upgrade is to read the docs and follow the examples.Please note that the default footer parses HTML automatically (such as `I'm bold!`) but it **does not implement any form of XSS or sanitisation**. You should do that yourself before passing it into the caption field of react-images.
### Using the Carousel
Import the carousel from `react-images` at the top of a
component and then use it in the render function.```jsx
import React from 'react'
import Carousel from 'react-images'const images = [{ source: 'path/to/image-1.jpg' }, { source: 'path/to/image-2.jpg' }]
class Component extends React.Component {
render() {
return
}
}
```### Using the Modal
Import the modal and optionally the modal gateway from
`react-images` at the top of a component and then use it in
the render function.The `ModalGateway` will insert the modal just before the
end of your `