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

@pluginjs/gradient

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluginjs/gradient

A flexible modern gradient js plugin.

0.8.10
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Gradient

npm package

A flexible modern gradient js plugin.

Samples

Introduction

Installation

Yarn

yarn add @pluginjs/gradient

NPM

npm i @pluginjs/gradient

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/gradient/dist/gradient.js"></script>

Production:

<script src="https://unpkg.com/@pluginjs/gradient/dist/gradient.min.js"></script>

Initialize

HTML:

<div class="element"></div>

ECMAScript Module:

import Gradient from "@pluginjs/gradient"

Gradient.of(document.querySelector('.element'), options)

CommonJS:

const Gradient = require("@pluginjs/gradient")

Gradient.of(document.querySelector('.element'), options)

Browser:

<script src="https://unpkg.com/@pluginjs/gradient/dist/gradient.js"></script>
<script>
  Pj.gradient('.element', options)
</script>

API

Options

Options are called on gradient instances through the gradient options itself. You can also save the instances to variable for further use.

NameDescriptionDefault
"prefixes"Set prefixes["-webkit-","-moz-","-ms-","-o-"]
"forceStandard"Set forceStandardtrue
"angleUseKeyword"Set angleUseKeywordtrue
"emptyString"Set emptyString``
"degradationFormat"Set degradationFormatfalse
"cleanPosition"Set cleanPositiontrue
"color"Set color{"format":false,"hexUseName":false,"reduceAlpha":true,"shortenHex":true,"zeroAlphaAsTransparent":false,"invalidValue":{"r":0,"g":0,"b":0,"a":1}}

Browser support

Tested on all major browsers.

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Opera
Opera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/gradient is Licensed under the GPL-v3 license.

If you want to use @pluginjs/gradient project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright (C) 2022 Creation Studio Limited.

FAQs

Package last updated on 29 Aug 2022

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