react-photo-collage
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

React Photo Collage

image

Installation

npm install react-photo-collage

Props

Name Type Required Default Description
width string false 800px
height an array of strings false []
layout an array of strings true []
photos an array of strings true []
showNumOfRemainingPhotos boolean true false

Usage

import { ReactPhotoCollage } from "react-photo-collage";

const setting = {
  width: '600px',
  height: ['250px', '170px'],
  layout: [1, 4],
  photos: [
    { source: 'url/image-1.jpg' },
    { source: 'url/image-2.jpg' },
    { source: 'url/image-3.jpg' },
    { source: 'url/image-4.jpg' },
    { source: 'url/image-5.jpg' },
    { source: 'url/image-6.jpg' },
  ],
  showNumOfRemainingPhotos: true
};

function App() {
  return (
    <ReactPhotoCollage {...setting} />
  );
}

Demo

image

React-Photo-Collage-CodeSandbox

Photos courtesy of Unsplash.

Development

npm install
npm run demo

Readme

Keywords

Package Sidebar

Install

npm i react-photo-collage

Weekly Downloads

236

Version

1.0.9

License

MIT

Unpacked Size

597 kB

Total Files

59

Last publish

Collaborators

  • sopetrichor