0.3.1 • Published 2 years ago

react-svg-blob v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

REACT-SVG-BLOB

React SVG Blob Generator. Inspired by blob shapes app original

NPM version NPM monthly download

react-svg-blob

Demo

https://codesandbox.io/s/react-svg-blob-kuzpc

Installation

$ yarn add react-svg-blob

Usage

import {SvgBlob} from 'react-svg-blob';
import {cross as crossPattern} from 'react-svg-blob/dist/lib/patterns';

<SvgBlob variant='solid' color='#00cec9' />;

<SvgBlob variant='gradient' colors={['#2980B9', '#6DD5FA']} />

<SvgBlob variant='pattern' pattern={crossPattern} color='#d1d8e0' isOutline />

<SvgBlob
  variant='image'
  image='https://source.unsplash.com/random/600x600/?plants'
/>

Options

parametertypedefaultdescription
variantsolid\|gradient\|pattern\|imageundefinedThe variant type of shape. Required true
isOutlinebooleanfalse
shapeProps.sizenumber200SVG blob path size
shapeProps.grownumber6Minimum size of the blob in percentage. More the smaller more the randomness
shapeProps.edgesnumber6Total nodes to create a shape. Increasing this value will add complexity to the shape
shapeProps.seednumberundefinedIt can be used to get same shape

We provide some patterns ready to use. You can find more of the pattern at Hero Patterns

Screenshot examples

License

MIT

0.3.1

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago