For projects that don't use React, icons are also available as *.svg files in the dist/svgs folder. Which contains folders for types (tokens, networks, wallets, exchanges) and variants (branded, mono, and background) svg icons.
npm i @web3icons/coreyarn add @web3icons/corebun i @web3icons/core- Token names are always ticker in uppercase.
ETH,BTC,GRT - Network names are always kebab-case.
ethereum,binance-smart-chain,bitcoin - Wallet names are always kebab-case.
metamask,coinbase-wallet,rabby - Exchange names are always kebab-case.
coinbase,uniswap,pancakeswap
svgs/tokens/branded/BTC.svgsvgs/networks/mono/ethereum.svgsvgs/wallets/branded/metamask.svgsvgs/exchanges/mono/bybit.svg
If you need to directly import the SVGs, here is the naming convention that you can use: {type} {variant} {symbol}
Tokens: prefixed withtokenfollowed byvariantand the uppercase ticker.tokenBrandedBTC,tokenMonoGRTNetworks: prefixed withnetworkfollowed byvariantand the PascalCase network name.networkMonoMetis,networkBrandedBinanceSmartChainWallets: prefixed withwalletfollowed byvariantand the PascalCase wallet name.walletBrandedRainbow,walletBrandedImtoken,walletBrandedWalletConnectExchanges: prefixed withexchangefollowed byvariantand the PascalCase exchange nameexchangeCoinbase,exchangePancakeSwap,exchangeBybit
The @web3icons/common package provides comprehensive metadata for all icons in a convenient format, which you can import directly into your project.
If you need the metadata, you can import it directly:
import {
tokens,
networks,
wallets,
exchanges,
} from '@web3icons/common/metadata'svgs object contains objects for each type
Note
This would import thousands of svgs into your project and would increase the bundle size, it is not recommended for general use.
import { svgs } from '@web3icons/core'
const IconDisplay = () => {
return (
<div>
<img src={svgs.tokens.brandedETH} alt="Ethereum Branded Token Icon" />
<img
src={svgs.networks.brandedEthereum}
alt="Ethereum Branded Network Icon"
/>
</div>
)
}const type = 'tokens'
const variant = 'branded'
const iconName = 'BTC'
const svgModule = await import(
`@web3icons/core/svgs/${type}/${variant}/${iconName}.svg`
)
const response = await fetch(svgModule.default.src)
const svgContent = await response.text()
console.log(svgContent)