JSPM

  • Created
  • Published
  • Downloads 82
  • Score
    100M100P100Q73227F
  • License ISC

2023.03.13/transparent-gradient/mr.chu

Package Exports

  • transparent-gradient
  • transparent-gradient/src/class/tGradient.ts
  • transparent-gradient/src/transparentGradient.ts

Readme

📚 Transparent gradient

Official

main ssss

Hello, families of developers~ This is a real transparent gradient, not a fake transparent one. I hope it will be helpful for your front desk development.

npm i transparent-gradient
new TGradient(target, direction)

First, you have to be the target for the gradient. The second is the direction.('right', 'bottom', 'top', 'left') You need to apply 'position: absolute' to the target.(asterisks) This is an example of use.

import { TGradient } from "transparent-gradient";

//target
const content = document.querySelector('.target')
new TGradient(content)
func Direction desc
new TGradient(target, 'right') right new TGradient(target, 'right') creates a gradient from right to left.
new TGradient(target, 'left') left new TGradient(target, 'left') creates a gradient from left to right.
new TGradient(target, 'top') top new TGradient(target, 'top') creates a gradient from top to bottom.
new TGradient(target, 'bottom') bottom new TGradient(target, 'bottom') creates a gradient from bottom to top.

2023.03.13/transparent-gradient/mr.chu