@nju33/react-masonry

A masonry layout library where used React and Flexbox

Stats

StarsIssuesVersionUpdatedCreatedSize
@nju33/react-masonry
021.0.13 years ago4 years agoMinified + gzip package size for @nju33/react-masonry in KB

Readme

react-masonry

TypeScript @nju33/react-masonry style: styled-components code style: prettier

Install

yarn add @nju33/react-masonry react react-dom styled-components

This library includes the d.ts.

Demo

https://nju33.github.io/react-masonry/

Sample Code

import React from 'react';
import {render} from 'react-dom';
import {Masonry} from '@nju33/react-masonry';

render(
  (
    <Masonry
      col={3} 
      gap={16} 
    >
      <div style={{width: '100%', height: '100px'}}>
        <Something />
      </div>
      <div style={{width: '100%', height: '100px'}}>
        <Something />
      </div>
      {/* ... */}
    </Masonry>
  ),
  document.body
)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.