New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@token-icons/react

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@token-icons/react

React components for incorporating Token Icons into React applications.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@token-icons/react

The @token-icons/react package provides React components for each cryptocurrency icon, allowing for easy integration and customization within your React applications.

Features

  • Over 2,500 optimized SVG icons.
  • Optimized for various use cases.
  • Supports branded and mono variants.
  • Compatible with various project types.
  • Supports tree-shaking.

Installation

Install the package via npm or yarn:

npm install @token-icons/react
# or
yarn add @token-icons/react
# or
bun add @token-icons/react

Usage

Import the icon component and use it in your React code:

import { IconBtc, IconEth } from '@token-icons/react'

function MyApp() {
  return (
    <div>
      <IconBtc variant="branded" size={32} />
      <IconEth variant="mono" size="2em" color="#333" />
    </div>
  )
}

Icon Component Props

The icons accept the following props allowing for customizable rendering:

  • variant: (Optional) Defines the variant of the icon (can be 'branded' or 'mono'). Defaults to 'mono'.
  • size: (Optional) Defines the size of the icon (can be a number for pixel size or a string for any valid CSS size).
  • color: (Optional) Applies a color to icons with the 'mono' variant (accepts any valid CSS color value). Defaults to '#fff'.
  • className: (Optional) Apply custom CSS classes for additional styling.

Tree-shaking

@token-icons/react is designed to be tree-shaken, meaning that it only includes the Icon Components that are actually used in your project. This can help reduce the size of your bundle and improve performance. Just import the icons you only need.

Feedback and Contributions

Your input is valuable to us. If you encounter any issues with an icon, discover a bug, or wish to request a new icon addition, we encourage you to contribute and help us improve.

For detailed instructions on how to contribute, please refer to our Contributing Guidelines.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Keywords

FAQs

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