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

react-cool-wrappers

v0.0.5

Published

Lightweight component wrappers with gradient colors and animations.

Downloads

51

Readme

react-cool-wrappers

Description:

react-cool-wrappers is a component wrapper designed to enhance your React applications with visually appealing gradient shadows and borders. With built-in animation support, it adds an extra layer of dynamism to your UI components. Customize colors and animations to fit the aesthetic of your project seamlessly.

Key Features:

  • Gradient shadows and borders
  • Animation support
  • Customizable colors and animations

Peer Dependencies

Make sure to install peer dependencies! Below are the list of peer dependencies.

  • react >=16.14.0 <=18.3.1
  • react-dom >=16.14.0 <=18.3.1
  • styled-components >=4.4.1 <=6
  • tslib>=2 will be removed soon!

APIs

GradientBorder

Importing

import {GradientBorder} from 'react-cool-wrappers';

Usage

const BorderButton = () => {
  return (
    <GradientBorder
      colors={[
        "blue",
        "skyblue",
        "royalblue",
        "teal",
        "pink",
        "purple",
        "blue",
      ]}
      size="10px"
      animation="train"
    >
      <button>Cool Button!</button>
    </GradientBorder>
  );
};

Properties

| Parameter | Type | Description | Default | | :-------- | :------- | :-------------------------------- | :------ | | colors | Array<string> | Required. Pass in an array of colors used for border gradient. It's recommended to keep the first & last color the same to enable seamless animation. | undefined | | size | string | This represents the border size of the wrapper. Expects a pixel value. | 10px | | borderRadius | string | This represents the border-radius of the wrapper. Expects a pixel value. | 10px | | blur | string | This represents the blur value for the gradient. Expects a pixel value. | 16px | | animation | 'off' \| 'pulse' | This represents the type of animation applied. | off | | animDuration | number | This represents the animation duration. | Default is different for different types | undefined | | attrs | HTMLAttributes<HTMLDivElement> | You can pass in the custom attributes for the wrapper here. Passed attributes will be provided to the wrapper. | undefined |

Demo


GradientShadow

Importing

import {GradientShadow} from 'react-cool-wrappers';

Usage

const ShadowButton = () => {
  return (
    <GradientShadow
      colors={[
        "blue",
        "skyblue",
        "royalblue",
        "teal",
        "pink",
        "purple",
        "blue",
      ]}
      spread="10px"
    >
      <button>Cool Button!</button>
    </GradientShadow>
  );
};

Properties

| Parameter | Type | Description | Default | | :-------- | :------- | :-------------------------------- | :------ | | colors | Array<string> | Required. Pass in an array of colors used for gradient. It's recommended to keep the first & last color the same to enable seamless animation. | undefined | | spread | string | This represents the shadow spread size. Expects a pixel value. | 10px | | borderRadius | string | This represents the border-radius of the wrapper. Expects a pixel value. | 10px | | blur | string | This represents the blur value for the shadow. Expects a pixel value. | 16px | | animation | 'off' \| 'pulse' | This represents the type of animation applied. | off | | animDuration | number | This represents the animation duration. | Default is different for different types | undefined | | attrs | HTMLAttributes<HTMLDivElement> | You can pass in the custom attributes for the wrapper here. Passed attributes will be provided to the wrapper. | undefined |

Demo

Feedback

If you have any feedback, please reach out to me at [email protected]

Author

License

MIT