Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josephmaxim/sc-react

🥇 [sc-react v1 alpha] A react library for creating non-rectangular/slanted container divs.
https://github.com/josephmaxim/sc-react

containers css3 react skewed

Last synced: about 1 month ago
JSON representation

🥇 [sc-react v1 alpha] A react library for creating non-rectangular/slanted container divs.

Awesome Lists containing this project

README

        

# Skewed container react (sc-react)
A react library for creating non-rectangular/slanted container divs.

[![Build Status](https://travis-ci.org/josephmaxim/sc-react.svg?branch=master)](https://travis-ci.org/josephmaxim/sc-react)
[![npm version](https://badge.fury.io/js/sc-react.svg)](https://badge.fury.io/js/sc-react)

![Hero Image](./opt-res.gif)

### Installation ([Medium post](https://medium.com/@josephmaxim/how-to-make-skewed-containers-in-react-3b92f1e2a74f))
```
npm install --save sc-react
```
or
```
yarn add sc-react
```

### Adding sc-react
```
import SkewedContainer from 'sc-react';
```
### Example
```
export default class extends React.Component{
render(){
return(



{/* YOUR CODE HERE */}


)
}
}
```

### Properties
```
SkewedContainer.propTypes = {
className: PropTypes.string,
style: PropTypes.object,
top: PropTypes.string,
bottom: PropTypes.string,
noMargin : PropTypes.bool,
bgColor: PropTypes.string
skew: PropTypes.Number
}
```