1.2.15 • Published 4 years ago

material-gradient-generator v1.2.15

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

Material Gradient Generator

Intended use case is mainly for React when you need to iterate over items in a list and apply a soft, linear gradient to them, i.e. buttons or dashboard items.

  • Install the package:

    • npm i material-gradient-generator --save
  • Import the gradient genetator:

    • import { materialGradientGenerator } from "material-gradient-generator";
  • Use the generator! 🔥

    • const colourGen = new materialGradientGenerator(false, 500, 200, 2);
    • const nextColour = colourGen.NextColour();
// excludeRed?: boolean
// darkShade?: number
// lightShade?: number
// _step?: number
const colourGen = new materialGradientGenerator(false, 500, 200, 2);
const nextColour = colourGen.NextColour();

<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
    <i className='fa fa-free-code-camp'></i>
</button>

<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
    <i className='fa fa-diamond'></i>
</button>

<button className='btn btn-light' style={{ margin: "5px", backgroundImage: `${nextColour}` }}
    <i className='fa fa-paper-plane'></i>
</button>

EXAMPLE.

1.2.15

4 years ago

1.2.12

4 years ago

1.2.13

4 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.2.1

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago