Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brycedorn/react-legos
CSS-driven React LEGO brick components
https://github.com/brycedorn/react-legos
brick javascript lego react react-component react-components
Last synced: 5 days ago
JSON representation
CSS-driven React LEGO brick components
- Host: GitHub
- URL: https://github.com/brycedorn/react-legos
- Owner: brycedorn
- License: mit
- Created: 2017-12-20T03:37:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T07:20:13.000Z (about 1 year ago)
- Last Synced: 2024-05-30T02:12:08.718Z (6 months ago)
- Topics: brick, javascript, lego, react, react-component, react-components
- Language: JavaScript
- Homepage: https://bryce.io/react-legos
- Size: 4.2 MB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-legos
[![npm version](https://badge.fury.io/js/react-legos.svg)](https://badge.fury.io/js/react-legos)
Try it out in [Storybook](https://bryce.io/react-legos).
## Make a LEGO brick!
```jsx
import Brick, { shapes } from 'react-legos'...
```
## Props
Prop | Default | Description
---- | ------- | -----------
`shape` || The shape of the brick. A grid of true/false values to determine if the index is a space or filled.
`size` | `medium` | The size of the brick: small, medium, or large.
`style` || Optional style param, useful for z-indexing and placing bricks on top of one another.
`color` | `#eee` | The color of the brick, Can use colors in `lib/colors.js`, which correspond to [this list](http://www.peeron.com/cgi-bin/invcgis/colorguide.cgi).
`opacity` | 1 | For making the brick transparent.
`optimize` | `true` | Disable to render all sides of bricks, including invisible ones.## Issues
If you find any issues with this component, please [report](https://github.com/brycedorn/react-legos/issues) them!
## Note
LEGO and the LEGO logo are trademarks and/or copyrights of the LEGO Group. This is not at all affiliated with The LEGO Group, and was simply a project of mine using the LEGO name as a proprietary eponym.