random-gradient
v0.0.2
Published
Generate beautiful random gradients
Downloads
2,432
Readme
random-gradient
Generate beautiful random gradients
Install
$ npm install --save random-gradient
Usage
// with React
import gradient from 'random-gradient'
export default ({ name }) => {
const bgGradient = { background: gradient(name) }
return (
<div style={bgGradient}>
<h2>{name}</h2>
</div>
)
}
API
randomGradient(uid, type)
uid
Type: string
Required
type
Type: string
Default: diagonal
Options: diagonal
, vertical
, horizontal
, radial
Related
- hash-avatar — :rainbow: Hash avatar algorithm
- react-hash-avatar — React hash avatar algorithm
License
MIT © Bu Kinoshita