0.0.2 • Published 7 years ago

random-gradient v0.0.2

Weekly downloads
233
License
MIT
Repository
github
Last release
7 years ago

random-gradient Build Status

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

License

MIT © Bu Kinoshita