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.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Gradienticons

Gradienticons Logo

Gradienticons is a powerful and flexible React icon component library that brings your icons to life with gradient support, hover effects, and shape variations. With its intuitive API and flexible input handling, Gradienticons makes it easy to create stunning, customizable icons for any React project.

npm version License: MIT React

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

Table of Contents

Installation

You can install Gradienticons using npm or yarn:

npm install gradienticons

or

yarn add gradienticons

Quick Start

Here's a quick example to get you started with Gradienticons:

import React from 'react';
import { Icon } from 'gradienticons';

function App() {
  return (
    <div>
      <h1>Welcome to My App</h1>
      <Icon
        name="home"
        size={50}
        gradientColors={['#ff00ff', '#00ffff']}
        shape="circle"
        backgroundColor="#f0f0f0"
      />
    </div>
  );
}

export default App;

Usage

Gradienticons is designed to be flexible and easy to use. Here's a more detailed example showcasing various features:

import React from 'react';
import { Icon } from 'gradienticons';

function MyComponent() {
  return (
    <div>
      <Icon
        name="home"
        size={50} // or "50px" or "3em"
        color="blue"
        gradientColors={['#ff00ff', '#00ffff']}
        hoverColor="red"
        hoverGradientColors={['#ff0000', '#0000ff']}
        shape="circle"
        backgroundColor="#f0f0f0"
        hoverBackgroundColor="#e0e0e0"
        outerPadding={10} // or "10px"
        opacity={0.8} // or "0.8"
        boxShadow="0 4px 6px rgba(0, 0, 0, 0.1)"
        iconShadow="2px 2px 2px rgba(0, 0, 0, 0.5)"
        cursor="pointer"
      />
    </div>
  );
}

export default MyComponent;

API Reference

PropTypeDefaultDescription
namestring-Name of the icon (required)
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 supports flexible input handling for all props. You can pass values as strings or numbers, and they will be correctly parsed and applied. This flexibility makes it easier to use Gradienticons in various contexts and with different styling approaches.

Example:

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

Contributing

We welcome contributions to Gradienticons! If you'd like to contribute, please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please make sure to update tests as appropriate and adhere to the existing coding style.

License

Distributed under the MIT License. See LICENSE for more information.


MIT © [DHEERAJ]

Keywords

FAQs

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