New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-cool-wrappers

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cool-wrappers

Lightweight component wrappers with gradient colors and animations.

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

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

ParameterTypeDescriptionDefault
colorsArray<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
sizestringThis represents the border size of the wrapper. Expects a pixel value.10px
borderRadiusstringThis represents the border-radius of the wrapper. Expects a pixel value.10px
blurstringThis represents the blur value for the gradient. Expects a pixel value.16px
animation'off' | 'pulse'This represents the type of animation applied.off
animDurationnumberThis represents the animation duration.Default is different for different types
attrsHTMLAttributes<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

ParameterTypeDescriptionDefault
colorsArray<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
spreadstringThis represents the shadow spread size. Expects a pixel value.10px
borderRadiusstringThis represents the border-radius of the wrapper. Expects a pixel value.10px
blurstringThis represents the blur value for the shadow. Expects a pixel value.16px
animation'off' | 'pulse'This represents the type of animation applied.off
animDurationnumberThis represents the animation duration.Default is different for different types
attrsHTMLAttributes<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 abdurmrahman7@gmail.com

Author

License

MIT

Keywords

React

FAQs

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