You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

random-gradient

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-gradient

Generate beautiful random gradients

0.0.2
latest
Source
npm
Version published
Maintainers
1
Created
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

  • hash-avatar — :rainbow: Hash avatar algorithm
  • react-hash-avatar — React hash avatar algorithm

License

MIT © Bu Kinoshita

FAQs

Package last updated on 08 Jun 2017

Did you know?

Socket

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