random-gradient
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/random-gradient package

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i random-gradient

Weekly Downloads

713

Version

0.0.2

License

MIT

Last publish

Collaborators

  • bukinoshita