1.4.0 • Published 3 months ago

transparent-gradient v1.4.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

🍀 Transparent gradient

DOCS

Index

JS React

Hello

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.

Installation

npm i transparent-gradient

What does it look like? React

Tgradient

interface ITGprops = {
  //direction gradient
  dir?: string;
  children?: React.ReactNode | undefined;
  //parent className
  wrapperClass?: string;
  //className
  className?: string;
}
import { Tgradient } from "transparent-gradient";

<Tgradient dir={"up"}>
  <p>transparent wow</p>
</Tgradient>

What does it look like? JS

import { TGradient } from "transparent-gradient";

//target
const content = document.querySelector('.target')
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: relative to the parent element.

This is an example of use.

funcDirectiondesc
new TGradient(target, 'right')rightnew TGradient(target, 'right') creates a gradient from right to left.
new TGradient(target, 'left')leftnew TGradient(target, 'left') creates a gradient from left to right.
new TGradient(target, 'top')topnew TGradient(target, 'top') creates a gradient from top to bottom.
new TGradient(target, 'bottom')bottomnew TGradient(target, 'bottom') creates a gradient from bottom to top.

2023.03.13/transparent-gradient/mr.chu

1.3.6

3 months ago

1.3.5

3 months ago

1.3.4

3 months ago

1.3.3

3 months ago

1.4.0

3 months ago

1.2.0

11 months ago

1.2.8

8 months ago

1.1.9

11 months ago

1.2.7

8 months ago

1.1.8

11 months ago

1.2.6

10 months ago

1.1.7

11 months ago

1.2.5

10 months ago

1.1.6

11 months ago

1.2.4

10 months ago

1.1.5

11 months ago

1.3.2

8 months ago

1.2.3

11 months ago

1.1.4

11 months ago

1.3.1

8 months ago

1.2.2

11 months ago

1.1.3

11 months ago

1.3.0

8 months ago

1.2.1

11 months ago

1.2.9

8 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago