Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

particles-blob

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

particles-blob

`ParticlesBlob` is a customizable particle animation component for React. You can use it to create dynamic, visually appealing particle effects in your applications with minimal effort.

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

ParticlesBlob

ParticlesBlob is a customizable particle animation component for React. You can use it to create dynamic, visually appealing particle effects in your applications with minimal effort.

Features

  • Customize particle size, amount, and animation duration
  • Apply border radius, blur, and blend mode effects
  • Use gradient or solid colors as background
  • Lightweight and easy to integrate into any React project

Installation

To install the package, use npm or yarn:

NPM

npm install particles-blob

Yarn

yarn add particles-blob

Usage

Once installed, you can import and use the ParticlesBlob component in your project like this:

import React from 'react';
import ParticlesBlob from 'particles-blob';

const App: React.FC = () => {
  return (
    <div>
      <ParticlesBlob
        particleSize={200}
        animationDuration={5}
        amount={50}
        borderRadius={100}
        blur={0}
        blendMode="normal"
        backgroundColors="radial-gradient(63.62% 69.52% at 100% 0%, rgba(247, 214, 98, 0.8) 0%, rgba(247, 214, 98, 0.17) 52.08%, rgba(247, 214, 98, 0) 100%)"
      />
    </div>
  );
};

export default App;

Props

Here’s a list of all the props that can be passed to the ParticlesBlob component:

PropTypeDescriptionDefault Value
particleSizenumberDefines the size of particles.100
animationDurationnumberSets the animation duration of particles (in seconds).5
amountnumberSpecifies the number of particles.30
borderRadiusnumberControls the border radius of the particles.50
blurnumberApplies a blur effect to the particles.0
blendModestringSpecifies the background blend mode for the particles."normal"
backgroundColorsstringSets the background color or gradient for the particles.""

Example

import React from 'react';
import ParticlesBlob from 'particles-blob';

const Example = () => (
  <div>
    <ParticlesBlob
      particleSize={150}
      animationDuration={4}
      amount={40}
      borderRadius={75}
      blur={10}
      blendMode="multiply"
      backgroundColors="radial-gradient(circle, rgba(63,94,251,1) 0%, rgba(252,70,107,1) 100%)"
    />
  </div>
);

export default Example;

Customization

You can pass any valid CSS background value to the backgroundColors prop, including gradients, solid colors, or multiple backgrounds. Combine the effects of blur, borderRadius, and blendMode to create unique visual styles.

Blend Modes

The blendMode prop allows you to choose different background blend modes, such as:

  • normal
  • multiply
  • screen
  • overlay
  • darken
  • lighten
  • color-dodge
  • color-burn

Contributing

If you’d like to contribute to the development of ParticlesBlob, please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

FAQs

Package last updated on 25 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc