@vnaidin/react-native-cryptocurrency-icons
v0.0.28
Published
React Native cryptocurrency icons as PNG components
Maintainers
Readme
React Native Cryptocurrency Icons
514+ cryptocurrency icons as PNG components for React Native. Works with bare RN, Expo, and any Metro-based workflow — no native linking, no SVG renderer needed.
Install
npm install @vnaidin/react-native-cryptocurrency-iconsUsage
import { CryptoIcon } from '@vnaidin/react-native-cryptocurrency-icons';
<CryptoIcon
symbol="btc"
size={32}
/>symbol is case-insensitive. Unknown symbols silently fall back to a placeholder — no crash.
Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| symbol | string | — | Coin symbol, e.g. "btc", "ETH" |
| size | number | 32 | Rendered width/height in points |
| resizeMode | ImageResizeMode | "contain" | How the image scales within its bounds |
| accessibilityLabel | string | symbol uppercased | Screen reader label |
| style | StyleProp<ImageStyle> | — | Extra styles passed to <Image> |
Utilities
import {
getCryptoIconSource,
getSupportedSymbols,
} from '@vnaidin/react-native-cryptocurrency-icons';
// Get the image source directly (useful for custom Image components)
const source = getCryptoIconSource('eth');
// Get all supported symbol strings
const symbols = getSupportedSymbols(); // ['0xbtc', 'aave', 'ada', ...]Adding a new coin
- Drop a PNG into
icons/originals/— any size, transparent background, named<symbol>.png(lowercase) - Run
npm run generate— resizes to 128×128 and regeneratessrc/iconsMap.ts - Run
npm run buildand commit
Missing a coin? Open an issue.
Dev reference
npm run generate # Resize originals/ → icons/128/, regenerate iconsMap.ts + validate
npm run build # Compile TypeScript (src/ → dist/) — run before committing
npm run check # Validate iconsMap.ts ↔ icons/128/ are in sync (bidirectional)
npm run generateDoc # Regenerate docs/index.html galleryPre-commit hook (Husky) runs check + auto-bumps the patch version in package.json — don't edit the version manually.
Publishing is automatic via GitHub Actions on pushes to master that touch package.json, src/**, or dist/**. Always run npm run build locally first — dist/ is committed and included in the published package.
Docs (docs/index.html) are regenerated and deployed to GitHub Pages automatically on pushes to master that touch docs/**, scripts/generate-html-gallery.js, or src/iconsMap.ts.
License
CC0-1.0 — icons originally from cryptoicons.co by Christopher Downer. React Native adaptation by vnaidin.
