UNPKG

react-images-extended-2

Version:

A simple, responsive lightbox component for displaying an array of images with React.js with extended features

95 lines (66 loc) โ€ข 2.33 kB
# React Images Extended <div align="center"> ![NPM Package](https://img.shields.io/npm/v/react-images-extended-2?style=for-the-badge&logo=npm&color=cb3837) ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white) ![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) </div> Compared to the legacy package, this fork is powered by: - โœจ The latest version of React - ๐Ÿ“ No JavaScript, all TypeScript - ๐ŸŽจ Easy styling with Tailwind CSS - ๐Ÿ“ฆ Better package management with PNPM - ๐Ÿ–ผ๏ธ Modern Display-PiP compatibility ## ๐Ÿ“ธ Demo <div align="center"> ### Core Functionality <img width="500" alt="Demonstration of core functionality" src="https://github.com/user-attachments/assets/3f34fcee-5fb3-4a72-bfb7-97d7abcf463f" /> ### Picture-in-Picture Behavior <img width="1000" alt="Demonstration of PiP behaviour" src="https://github.com/user-attachments/assets/e5ce5b06-7418-4a50-80e9-8e2aae227721" /> </div> ## ๐Ÿ”— Useful Links (Work in progress) | Resource | Description | |----------|-------------| | ๐Ÿ“ฆ [NPM Package](https://www.npmjs.com/package/react-images-extended-2) | Install and view package details | | ๐Ÿงช [Test Locally](#) | How to test and run locally | | ๐Ÿค [Contributing](#) | How to contribute | | ๐Ÿ“š [Basic Usage](#) | Understanding the demo and basic usage | ## ๐Ÿš€ Quick Start ```bash npm install react-images-extended-2 ``` ```tsx import { Lightbox, IImage } from 'react-images-extended-2'; import 'react-images-extended-2/dist/styles.css'; const images: IImage[] = [ { src: 'image1.jpg', caption: 'Image 1' }, { src: 'image2.jpg', caption: 'Image 2' }, ]; function App() { return ( <Lightbox images={images} onClose={() => setIsOpen(false)} showThumbnails={true} /> ); } ``` ## โœจ Features <details> <summary><b>๐Ÿ–ผ๏ธ Image Management</b></summary> - Zoom, rotate, and drag functionality - Thumbnail navigation - Keyboard shortcuts - Touch/gesture support </details> <details> <summary><b>๐ŸŽฏ Modern Features</b></summary> - Picture-in-Picture mode - Full TypeScript support - Tailwind CSS styling - Responsive design </details> --- <div align="center"> **Made with โค๏ธ by [Isla](https://github.com/ryan-n-may)** </div>