GithubHelp home page GithubHelp logo

tgoodwin / react-image-masonry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christikaes/react-image-masonry

0.0 2.0 0.0 2.86 MB

Simple react component for image masonry

Home Page: https://christikaes.github.io/react-image-masonry/

HTML 12.06% CSS 3.70% JavaScript 84.24%

react-image-masonry's Introduction

NPM

React Image Masonry

Generate image masonry easily with this react component! Detailed docs and demo here: https://christikaes.github.io/react-image-masonry/

Getting Started

Have you ever needed to quickly spin up a simple image gallery with masonry tiling in react? You've come to the right place :D

React Image Masonry is a simple react component that lets you add a gallery of images to your app. It's super light-weight and requires no external dependencies! Have fun using it and feel free to contribute on Github (:

Installation

You can download the package from npm with:

npm install react-image-masonry --save

Usage Simple

To use simply import the component, and specify an array of imageUrls and number of columns

<ImageMasonry
    imageUrls={[
        'https://media.giphy.com/media/8Ry7iAVwKBQpG/giphy.gif',
        'https://media.giphy.com/media/KI9oNS4JBemyI/giphy.gif',
        ...]}
    numCols={3}
/>

Usage Advanced

You can also pass in an array of components, containerWidth, containerHeight, scroll and animate like this:

<ImageMasonry
    numCols={3}
    containerWidth={"600px"}
    animate={true}
    scrollable={true}
    containerHeight={"400px"}
    className="my-class"
    forceOrder={true}
>
    {images}
<ImageMasonry>

Demo

https://christikaes.github.io/react-image-masonry/

Contributing

Contributions are welcome on github!! https://github.com/christikaes/react-image-masonry

react-image-masonry's People

Contributors

christikaes avatar jylopez avatar morgannewman avatar

Watchers

James Cloos avatar Timothy Goodwin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.