Registry / ui / react-native-jazzicon

react-native-jazzicon

JSON →
library0.1.2jsnpmunverified

React Native port of the Jazzicon identicon generator, rendering deterministic, colorful avatars from Ethereum addresses. Current stable version is 0.1.2, with no active development in the past 5+ years. It requires react-native-svg for SVG rendering. Unlike the web version, this package is tailored for React Native apps and provides a simple component prop interface.

npm install react-native-jazzicon
INSTALL
IMPORT
SIG · REACT-NATIVE-JAZZI
R
react-native-jazzicon
uijavascriptv0.1.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Jazzicon
import Jazzicon from 'react-native-jazzicon'
import { Jazzicon } from 'react-native-jazzicon'
Default export only; named import does not work.
Jazzicon (TypeScript)
import Jazzicon from 'react-native-jazzicon'
Package ships TypeScript types; import works identically.
Jazzicon (require)
const Jazzicon = require('react-native-jazzicon').default
const Jazzicon = require('react-native-jazzicon')
CommonJS users must access .default property.

Basic usage of Jazzicon component with an Ethereum address, demonstrating required props size and address.

import React from 'react'; import { View } from 'react-native'; import Jazzicon from 'react-native-jazzicon'; export default function App() { return ( <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <Jazzicon size={40} address={'0x1234567890abcdef1234567890abcdef12345678'} /> </View> ); }
Debug
Known issues
deprecatedPackage has not been updated since 2018. Consider using alternative identicon libraries for React Native.
fix
Migrate to a maintained alternative like react-native-blockies.
affects: >=0.0.1
gotchaMissing react-native-svg peer dependency will cause runtime error: 'Cannot find module react-native-svg'
fix
Install react-native-svg: npm install react-native-svg
affects: >=0.1.0
breakingIn react-native-svg v7+, SVG component API changed; may break rendering if not using compatible version.
fix
Keep react-native-svg at version ^6.5.2 or follow migration guide.
affects: >=0.1.0
gotchaComponent expects address as 42-character hex string with 0x prefix; shorter or missing prefix yields different identicons.
fix
Always provide full checksummed Ethereum address with 0x prefix.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: (0, _reactNativeJazzicon.default) is not a function
Using require without .default in CommonJS.
fix
Use const Jazzicon = require('react-native-jazzicon').default;
Invariant Violation: ViewPropTypes has been removed from React Native
React Native 0.69+ removed ViewPropTypes; package uses it internally.
fix
Use react-native <=0.68 or patch package with react-native-forward-ref.
Error: Cannot find module 'react-native-svg'
Missing peer dependency
fix
npm install react-native-svg
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
react-native-svgrequiredrequired for rendering SVG identicons
Agent activity
34 hits · last 30 days
node
28
OpenAI (training)
1
Resources
react-native-jazzicon — npm install react-native-jazzicon · libregistry