![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@token-icons/react
Advanced tools
React components for incorporating Token Icons into React applications.
The @token-icons/react
package provides React components for each cryptocurrency icon, allowing for easy integration and customization within your React applications.
Install the package via npm or yarn:
npm install @token-icons/react
# or
yarn add @token-icons/react
# or
bun add @token-icons/react
@token-icons/react
All the icons from the React library is prefixed with "Token" or "Network". Token Icons: Prefixed uppercase symbol with "Token" e.g. TokenETH, TokenBTC, TokenGRT Network Icons: Prefixed CamelCase network name with "Network" e.g. NetworkBinanceSmartChain, NetworkEthereum, NetworkAvalanche.
import {
TokenBTC,
TokenETH,
TokenGRT,
NetworkBinanceSmartChain,
NetworkEthereum,
NetworkAvalanche,
} from '@token-icons/react'
const App = () => {
return (
<>
<div className="my-class-name">
<h1>Token Icons</h1>
<TokenBTC size={64} variant="branded" className="my-custom-class" />
<TokenETH size={64} variant="branded" className="my-custom-class" />
<TokenGRT size={64} variant="branded" className="my-custom-class" />
</div>
<div className="my-class-name">
<h1>Network Icons</h1>
<NetworkEthereum
size={64}
variant="branded"
className="my-custom-class"
/>
<NetworkAvalanche
size={64}
variant="branded"
className="my-custom-class"
/>
<NetworkBinanceSmartChain
size={64}
variant="branded"
className="my-custom-class"
/>
</div>
</>
)
}
export default App
<TokenIcon />
from @token-icons/react
<TokenIcon />
is designed to accept different props to allow for ease of use.
symbol?
: the ticker symbol of the token. e.g. "ETH", "BTC", "GRT"address?
: the contract address of the token.network?
: the blockchain network of the token.variant?
= "mono": can be "mono" or "branded" to choose the icon style.size?
: size of the icon (number or string).color?
: color of the icon (CSS color value).className?
: additional CSS class for custom styling.You need to pass either symbol or address and network.
<TokenIcon />
accepts a union of types for symbol
, address
, and network
. This allows for flexibility in using the component.
You can pass ticker or symbol of the desired icon. refer to metadata for full list of symbols.
import { TokenIcon } from '@token-icons/react'
const App = () => {
const symbols = ['ETH', 'GRT', 'BTC']
const variant = 'mono' // can be "mono" or "branded"
const size = 48 // can be number or string
return (
<div>
{symbols.map((s) => (
<TokenIcon
key={s}
symbol={s}
size={size}
variant={variant}
className="my-custom-class"
/>
))}
</div>
)
}
export default App
You can pass in both network and an address to render a specific token icon. refer to metadata for full list of symbols, addresses and networks.
import { TokenIcon } from '@token-icons/react'
;<TokenIcon
network="ethereum"
address="0xc944e90c64b2c07662a292be6244bdf05cda44a7"
size={32}
variant={'branded'}
className="my-custom-class"
/>
<NetworkIcon />
from @token-icons/react
<NetworkIcon />
is designed to render blockchain network icons.
network
: The blockchain network's identifier. References the Coin Gecko's asset platform fields. Check the (networks.json)[https://github.com/0xa3k5/token-icons/blob/main/packages/core/src/metadata/networks.json] file for a list of available networks.variant?
= "mono": can be "mono" or "branded" to choose the icon style.size?
: size of the icon (number or string).color?
: color of the icon (CSS color value).className?
: additional CSS class for custom styling.import { NetworkIcon } from '@token-icons/react'
;<NetworkIcon
network="ethereum"
size={32}
variant={'branded'}
className="my-custom-class"
/>
@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.
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.
This project is licensed under the MIT License. See the LICENSE file for more information.
FAQs
React components for incorporating Token Icons into React applications.
The npm package @token-icons/react receives a total of 0 weekly downloads. As such, @token-icons/react popularity was classified as not popular.
We found that @token-icons/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.