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

gradienticons

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gradienticons

A versatile React icon component library with gradient support, hover effects, and customizable shapes. Perfect for modern UI designs.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
0
Weekly downloads
 
Created
Source

Gradienticons

Gradienticons is a versatile and customizable React icon component library with support for gradients, hover effects, and shape variations. It offers flexible input handling for all props, making it easy to use in various scenarios.

Features

  • 🎨 Support for solid colors and gradients
  • 🖱️ Hover effects for colors and gradients
  • 🔷 Multiple shape options (circle, square)
  • 📏 Customizable size and padding
  • 🔳 Background color and shape customization
  • 💫 Box shadow and icon shadow effects
  • 🔄 Flexible input handling for all props

Installation

npm install gradienticons

or

yarn add gradienticons

Usage

import { Icon } from 'gradienticons';

function MyComponent() {
  return (
    <Icon
      name="home"
      size={50} // or "50px" or "3em"
      color="blue"
      gradientColors={['#ff00ff', '#00ffff']}
      hoverColor="red"
      shape="circle"
      backgroundColor="#f0f0f0"
      outerPadding={10} // or "10px"
      opacity={0.8} // or "0.8"
    />
  );
}

API

PropTypeDefaultDescription
namestring-Name of the icon
sizestring | number'1em'Size of the icon
colorstring'currentColor'Color of the icon
gradientColorsarraynullArray of two colors for gradient
hoverColorstringnullColor on hover
hoverGradientColorsarraynullGradient colors on hover
directionStartstring'topLeft'Start direction of gradient
directionEndstring'bottomRight'End direction of gradient
opacitystring | number1Opacity of the icon
backgroundColorstring'transparent'Background color
hoverBackgroundColorstringnullBackground color on hover
shapestring'circle'Shape of the icon ('circle' or 'square')
borderRadiusstring | number0Border radius for square shape
paddingstring | number0Inner padding
outerPaddingstring | number0Outer padding
boxShadowstringnullBox shadow CSS
iconShadowstringnullIcon shadow CSS
cursorstring'default'Cursor style

Flexible Input Handling

Gradienticons now supports flexible input handling for all props. You can pass values as strings or numbers, and they will be correctly parsed and applied. For example:

<Icon
  size={80} // or "80px" or "5em"
  opacity={0.7} // or "0.7"
  borderRadius="10px" // or 10
  outerPadding="5" // or 5
/>

This flexibility makes it easier to use Gradienticons in various contexts and with different styling approaches.

License

MIT © [DHEERAJ]

Keywords

FAQs

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