npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gradient-icon-motion

v1.0.1

Published

This package provides three React components for animated backgrounds and floating icons.

Downloads

4

Readme

Gradient Icon Motion

This package provides three React components for animated backgrounds and floating icons.

Components

1. BackgroundGradients

Creates a customizable gradient animation background.

Usage:

import 'gradient-icon-motion/dist/esm/index.css';
import { BackgroundGradientAnimation } from 'gradient-icon-motion';

<BackgroundGradientAnimation
    animationHeight={"100vh"}
    animationWidth={"100vw"}
>
    <div
        style={{
            width: '100%',
            height: '100vh',
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
            fontSize: '2rem',
            fontWeight: '600',
            color: 'white'
        }}
    >
        Elegant gradient backgrounds in motion
    </div>
</BackgroundGradientAnimation>

You can use other props to modify your animation.

| Prop Name | Type | Default Value | Description | | --- | --- | --- | --- | | gradientBackgroundStart | string | 'rgb(108, 0, 162)' | Starting RGB color of the gradient background. | | gradientBackgroundEnd | string | 'rgb(0, 17, 82)' | Ending RGB color of the gradient background. | | firstColor | string | '18, 113, 255' | First color of the gradient (withou rgb tag). | | secondColor | string | '221, 74, 255' | Second color of the gradient (without rgb tag). | | thirdColor | string | '100, 220, 255' | Third color of the gradient (without rgb tag). | | fourthColor | string | '200, 50, 50' | Fourth color of the gradient (without rgb tag). | | fifthColor | string | '80, 180, 50' | Fifth color of the gradient (without rgb tag). | | size | string | '80%' | Size of floating gradients (circles). | | blendingValue | string | 'hard-light' | Blending mode used for the floating gradients. | | animationHeight | string | '100vh' | Height of the animation | | animationWidth | string | '100vw' | Width of the animation | | children | React.ReactNode | undefined | content to be rendered within the gradient background. |

This component, originally adapted and modified from here, creates a smooth gradient animation that can be customized with various props to fit the desired aesthetic of your project.

2. FloatingIcons

Renders randomly shuffles floating icons.

Usage

import 'gradient-icon-motion/dist/esm/index.css';
import { FloatingIcons } from 'gradient-icon-motion';

<FloatingIcons
    animationHeight={"100vh"}
    animationWidth={"100vw"}
    iconColor="black"
>
    <div
        style={{
            width: '100%',
            height: '100vh',
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
            fontSize: '2rem',
            fontWeight: '600'
        }}
    >
        Floating icons create visual interest
    </div>
</FloatingIcons>

You can use other props to modify your animation.

| Prop Name | Type | Default Value | Description | | --- | --- | --- | --- | | icons | array | ['fa-solid fa-magnifying-glass', ...15 more] | An array of icons (Fontawesome icons) to be used for the floating icons. | | iconColor | string | '#EEE8AA' | The color of the floating icons. | | floatingDirectionReverse | boolean | false | Whether to reverse the floating direction of the icons. | | animationHeight | string | '100vh' | Height of the animation | | animationWidth | string | '100vw' | Width of the animation | | children | React.ReactNode | undefined | content to be rendered within the gradient background. |

Note: For optimal performance, use 15 icons. Increasing icons count will lead to slower animation and high floating speed. Currently working on this issue.

GradientIconMotion

Combines both BackgroundGradients and FloatingIcons animations.

Usage:

import 'gradient-icon-motion/dist/esm/index.css';
import { GradientIconMotion } from 'gradient-icon-motion';

<GradientIconMotion
    animationHeight={"100vh"}
    animationWidth={"100vw"}
    iconColor="black"
>
    <div
        style={{
            width: '100%',
            height: '100vh',
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
            fontSize: '2rem',
            fontWeight: '600',
            color: 'white'
        }}
    >
        Captivating blend of gradients and icons
    </div>
</GradientIconMotion>

Supports props from both BackgroundGradients and FloatingIcons components.

Contribution

Contributions are welcome! Open issues or submit pull requests to help enhance this package (GitHub).