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

@nauverse/react-aurora-background

v1.0.12

Published

🌌 React Aurora background component. Lightweight, customizable, beautiful.

Downloads

921

Readme

🌌 React Aurora Component

My personal, lightweight, customizable and beautiful take for the typical background aurora effect we see in some websites using the glassmorphism style. Plug and play!

React Aurora Component

🎞️ Demo

You can see it working by yourself in this little demo: https://thenaubit.github.io/react-aurora-background/

✨ Features

  • Uses TypeScript by default.
  • It has both ESM and CJS modules, as well as type definitions.
  • Minimal - Almost no dependencies!
  • Fast
  • SSR compatible! (and of course, it works in Next.JS 13 as a Server Component!)
  • Customizable. Change everything. Colors, speed, blur...
  • Compatible. It works in Chrome, Edge, Firefox, Webkit... desktop and mobile devices!

πŸ”§ How to install?

Just type this in your terminal:

npm install @nauverse/react-aurora-background

Or in case you are using yarn:

yarn add @nauverse/react-aurora-background

Also for pnpm:

pnpm i @nauverse/react-aurora-background

❓ How to use it?

Just wrap your app with it, like another provider.

// 1. Import the provider
import { AuroraBackgroundProvider } from '@nauverse/react-aurora-background';

const MyApp = () => {
  return (
    // 2. Wrap your app with the provider and done!
    <AuroraBackgroundProvider>
      // The rest of your app
    </AuroraBackgroundProvider>
  );
};

If you want an example, you can check this one.

πŸ› οΈ Settings

You can set some props to the provider to customize the behavior: |Prop Name |Description |Default Value | |--- |--- |--- | |colors |It contains an array of color strings (hex, rgb or rgba) that will be used in the aurora background. |["#FC466B", "#3f5efb", "#F8FF00", "#3AD59F"] | |numBubbles |It is the number of bubbles that creates the aurora effect. It can be an integer between 2 and 9 (both inclusive). I recommend to pick a number closer to the middle for the best experience. |4 | |animDuration |It is a number greater than 0 (can be decimal). It is the duration in seconds of the aurora animation before it loops. |5 (seconds) | |blurAmount |It can be a number or a string. It specifies the amount of blur the aurora will have. It sets a backdropFilter CSS property so the value must be a valid CSS value. If you pass a number, it will be converted to pixels by appending a "px" string after the number. If you pass a string, it must be a valid CSS value (like "5vw", "100%"...). |"10vw" | |bgColor |It is the color of the background of the div containing the aurora. It is a color string (hex, rgb or rgba). |"#3f5efb" | |useRandomness |It is a boolean. If enabled, instead of using always the same values for width, height and animation-delay properties on each bubble item, it will add some small randomness. |false | |className |An optional string containing the extra class/classes to be added to the container. | | |style |An optional object containing styles to be added to the container. | |

πŸ› Bugs, Issues and Contributing

This is an Open Source package so feel free to create an Issue or a Pull Request (or even to Fork it) if you want!

🐣 About me!

Find me on Twitter: @naucode

πŸ’­ Changelog

  • v1.0.12: Improved the internal structure πŸ”§
  • v1.0.11: Added extra props and fixed build issues πŸ”§
  • v1.0.10: Updated dependencies and fixed broken links πŸ”—
  • v1.0.9: Improved default settings ✨
  • v1.0.8: Fixed Firefox support πŸ”§
  • v1.0.7: Fixed iOS blur issue πŸ”§
  • v1.0.6: Added some performance improvements (now we use the GPU when possible) ✨
  • v1.0.5: Fixed optimization in bubble items πŸ”§
  • v1.0.4: Fixed build generation - part 2 πŸ”§
  • v1.0.3: Fixed build generation πŸ”§
  • v1.0.2: Fixed demo link πŸ”§
  • v1.0.1: Fixed docs πŸ”§
  • v1.0.0: This is the first public version of the package, let's go! πŸš€