1.1.1 • Published 8 months ago
react-gallery-component2 v1.1.1
React Gallery Component 2
A responsive image gallery component for React using Tailwind CSS. This component allows you to display a beautiful and customizable gallery of images, perfect for showcasing photos, artworks, or any visual content.
Installation
To install the package, run the following command:
npm install react-gallery-component2
Or if you're using Yarn:
yarn add react-gallery-component2
Usage
Once installed, you can import and use the Gallery
component in your React application.
Example
Here is a basic example of how to use the Gallery
component:
Website using the Component: TravelLog
import React from 'react';
import Gallery from 'react-gallery-component2';
const App = () => {
// Array of image objects
const images = [
{
src: 'https://example.com/image1.jpg',
},
{
src: 'https://example.com/image2.jpg',
},
{
src: 'https://example.com/image3.jpg',
},
// Add more images as needed
];
return (
<div className="App">
<h1>My Image Gallery</h1>
<Gallery images={images} />
</div>
);
}
export default App;
Props
images
: An array of objects where each object contains the imagesrc
(URL).
Example:
const images = [
{
src: 'https://example.com/image1.jpg',
},
{
src: 'https://example.com/image2.jpg',
},
];
Contact
If you have any questions or issues with the component, feel free to reach out:
- Author: Bilaal Bare
- Twiter: @BRRE
License
This project is licensed under the MIT License - see the LICENSE file for details.