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

tsparticles-slim

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsparticles-slim

tsParticles slim version

  • 2.0.0-alpha.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
decreased by-23.31%
Maintainers
1
Weekly downloads
 
Created
Source

banner

tsparticles-preset-bigCircles

tsParticles preset for big colored circles on a white background.

Sample

demo

How to use it

CDN / Vanilla JS / jQuery

First of all install tsParticles following the instructions for vanilla javascript in the main project here

Once installed you need one more script to be included in your page (or you can download that from jsDelivr:

<script src="https://cdn.jsdelivr.net/npm/tsparticles-preset-big-circles"></script>

This script MUST be placed after the tsParticles one.

Once the scripts are loaded you can set up tsParticles like this:

tsParticles.load("tsparticles", {
  preset: "bigCircles", // also "big-circles" is accepted
});

Important ⚠️ You can override all the options defining the properties like in any standard tsParticles installation.

tsParticles.load("tsparticles", {
  particles: {
    shape: {
      type: "square",
    },
  },
  preset: "bigCircles", // also "big-circles" is accepted
});

Like in the sample above, the circles will be replaced by squares.

React.js / Preact / Inferno

The syntax for React.js, Preact and Inferno is the same.

I'll show a simplified sample you can find in this repository; it uses class component, but you can choose any syntax you prefer.

import Particles from "react-tsparticles";
import { Main } from "tsparticles";
import { loadPreset } from "tsparticles-preset-big-circles";

export class ParticlesContainer extends React.PureComponent<IProps> {
  // this customizes the component tsParticles installation
  customInit(tsParticles: Main) {
    // this adds the preset to tsParticles, you can safely use the
    loadPreset(tsParticles);
  }

  render() {
    const options = {
      preset: "bigCircles", // also "big-circles" is accepted
    };

    return <Particles options={options} init={this.customInit} />;
  }
}

Vue (2.x and 3.x)

Angular

Svelte

Keywords

FAQs

Package last updated on 07 Feb 2021

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