|
| 1 | + |
| 2 | +# react-native-background-shapes |
| 3 | + |
| 4 | +[](https://npmjs.org/package/react-native-backgroud-shapes) [](https://raw.githubusercontent.com/kevoj/react-native-backgroud-shapes/master/LICENSE) |
| 5 | + |
| 6 | +> Beautiful backgrounds shapes to React Native based in flex |
| 7 | +
|
| 8 | +### Examples |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +### Installation |
| 15 | +**Yarn** |
| 16 | +```bash |
| 17 | +yarn add react-native-background-shapes |
| 18 | +``` |
| 19 | +**Npm** |
| 20 | +```bash |
| 21 | +npm i react-native-background-shapes |
| 22 | +``` |
| 23 | +### Usage |
| 24 | +```javascript |
| 25 | +import react from "react"; |
| 26 | +import {View} from "react-native"; |
| 27 | +import {Shapes} from "react-native-background-shapes"; |
| 28 | + |
| 29 | +export const example () => { |
| 30 | +return ( |
| 31 | + <View> |
| 32 | + <Shapes /> |
| 33 | + </View> |
| 34 | + ); |
| 35 | +} |
| 36 | +``` |
| 37 | +### Options |
| 38 | + |
| 39 | +```javascript |
| 40 | +// Basic |
| 41 | + <Shapes /> |
| 42 | +// Advance |
| 43 | + <Shapes |
| 44 | + primaryColor="#416DF8" |
| 45 | + secondaryColor="#2F53D5" |
| 46 | + height={3} |
| 47 | + borderRadius={20} |
| 48 | + figures={[ |
| 49 | + {name: 'circle', position: 'center', size: 60}, |
| 50 | + {name: 'donut', position: 'flex-start', axis: 'top', size: 80}, |
| 51 | + {name: 'circle', position: 'center', axis: 'right', size: 100}, |
| 52 | + ]} |
| 53 | + /> |
| 54 | +``` |
| 55 | +**primaryColor**: String, HEX color. |
| 56 | +**secondaryColor**: String, HEX color. |
| 57 | +**height**: Number, 1 = full screen, default (3.5) |
| 58 | +**borderRadius**: Number, default 30 |
| 59 | +**figures**: Array |
| 60 | +* **name**: String = "circle","donut, "triangle", "diamondNarrow", "cutDiamond" |
| 61 | +* **position**: String = "flex-start", "center, "flex-end", "baseline", "stretch" |
| 62 | +* **axis**: String = "top", "right, "bottom", "left" |
| 63 | + |
| 64 | +## License |
| 65 | + |
| 66 | +MIT © [Leonardo Rico](https://github.com/kevoj/react-native-background-shapes/blob/master/LICENSE) |
0 commit comments