Socket
Socket
Sign inDemoInstall

random-gradient

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    random-gradient

Generate beautiful random gradients


Version published
Weekly downloads
442
decreased by-46.1%
Maintainers
1
Install size
405 kB
Created
Weekly downloads
 

Readme

Source

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

License

MIT © Bu Kinoshita

FAQs

Last updated on 08 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc