# react-diagonal-container

> ### Click [Here](https://lotwd.github.io/react-diagonal-container-demo/) for a demonstration

Latest version **0.2.2** (published 2021-07-05) · 0 weekly downloads

## Install

```sh
npm install react-diagonal-container
pnpm add react-diagonal-container
yarn add react-diagonal-container
bun add react-diagonal-container
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2021-07-05 |
| First published | 2021-07-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | lotwd |

## Links

- npm: https://www.npmjs.com/package/react-diagonal-container
- Repository: https://github.com/lotwd/react-diagonal-container
- Homepage: https://lotwd.github.io/react-diagonal-container-demo
- Issues: https://github.com/lotwd/react-diagonal-container/issues
- npm.io page: https://npm.io/package/react-diagonal-container

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2
- [web-vitals](https://npm.io/package/web-vitals.md) ^1.1.2
- [react-scripts](https://npm.io/package/react-scripts.md) 4.0.3
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^11.2.7
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.14.1
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^12.8.3

## Recent versions

- 0.2.2 (latest) — 2021-07-05
- 0.2.1 — 2021-07-05
- 0.2.0 — 2021-07-04
- 0.1.1 — 2021-07-01
- 0.1.0 — 2021-07-01

## README

# This package provides a container that can be skewed

### Click [Here](https://lotwd.github.io/react-diagonal-container-demo/) for a demonstration

### Usage:

`npm install react-diagonal-container`

`import { DiagonalContainer } from 'react-diagonal-container'`

`<DiagonalContainer background="green" flattenBottom spacingAfter="200px">`
`   {content}`
`</DiagonalContainer>`


### Props:

Name | Type | Default | Purpose 
-----|-------|--------|-------
background | string | 'black' | sets the background color of the tilted element
borderColor | 'string' | 'transparent' | sets the border color
borderHeight | 'string' | '0px' | sets the border height
containerBackground | string | 'transparent' | changes the background color of the container
containerBottomBackgroundColor | string | null | sets a linear gradient bottom value for the container color
containerTopBackgroundColor | string | null | sets a linear gradient top value for the container color
flattenBottom | boolean | false | removes skew from bottom of the element
flattenTop | boolean | false | removes skew from top of the element
flip | boolean | false | flips the element horizontally
magnitude | string | small | determines the slop of the tilt ('tiny', 'small', 'medium', 'large', 'extreme')
roundedCorners | boolean | false | adds a 10px border radius
shadow | boolean | false | adds box shadow
spacingAfter | string | '150px' | sets the spacing between two tilted elements
tiltedContent | boolean | false | skews the content with the container

#### Updates


### 0.2.2
* fixed issue with overlapping containers both showing borders

### 0.2.1
* borders now work when using flattenTop or flattenBottom

### 0.2.0
* shadow prop to add box shadow effect
* borderColor and borderWidth props to add a border
* roundedCorners prop to add a border radius
* tiltedContent prop to allow for content to be tilted


#### Note:

flattenTop and flattenBottom produce issues when used with shadow or roundedCorners. Usage of the flatten props disables the usage of these other two props.

---
_Source: https://npm.io/package/react-diagonal-container · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
