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

gradient-icon-motion

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradient-icon-motion

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

1.0.1
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

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 NameTypeDefault ValueDescription
gradientBackgroundStartstring'rgb(108, 0, 162)'Starting RGB color of the gradient background.
gradientBackgroundEndstring'rgb(0, 17, 82)'Ending RGB color of the gradient background.
firstColorstring'18, 113, 255'First color of the gradient (withou rgb tag).
secondColorstring'221, 74, 255'Second color of the gradient (without rgb tag).
thirdColorstring'100, 220, 255'Third color of the gradient (without rgb tag).
fourthColorstring'200, 50, 50'Fourth color of the gradient (without rgb tag).
fifthColorstring'80, 180, 50'Fifth color of the gradient (without rgb tag).
sizestring'80%'Size of floating gradients (circles).
blendingValuestring'hard-light'Blending mode used for the floating gradients.
animationHeightstring'100vh'Height of the animation
animationWidthstring'100vw'Width of the animation
childrenReact.ReactNodeundefinedcontent 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 NameTypeDefault ValueDescription
iconsarray['fa-solid fa-magnifying-glass', ...15 more]An array of icons (Fontawesome icons) to be used for the floating icons.
iconColorstring'#EEE8AA'The color of the floating icons.
floatingDirectionReversebooleanfalseWhether to reverse the floating direction of the icons.
animationHeightstring'100vh'Height of the animation
animationWidthstring'100vw'Width of the animation
childrenReact.ReactNodeundefinedcontent 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).

FAQs

Package last updated on 03 Sep 2024

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