rm

react-mosaic

Generate mosaic images in react.

Showing:

Popularity

Downloads/wk

9

GitHub Stars

3

Maintenance

Last Commit

2yrs ago

Contributors

4

Package

Dependencies

2

Size (min+gzip)

7.7KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

react-mosaic

Generate mosaic images in react.

Build Status npm version Greenkeeper badge

https://chitchu.github.io/react-mosaic/

Getting started

$ npm install react-mosaic
import React from 'react';
import Mosaic from 'react-mosaic';

const imageSource = 'data:image/png;base64, ...'; //requires base64 encoded image

// If you don't pass a `tileRenderer` function the
// component will render each tile with a boring box.
const tileRenderer = props => (
  <circle cx={props.x} cy={props.y} r={6} fill={props.fill} key={props.key} />
);

const App = () => (
  <Mosaic src={imageSource} tileSize="12" width="800" height="450" tileRenderer={tileRenderer} />
);

export default App;

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100