Gathering detailed insights and metrics for react-native-circle-qrcode-svg
Gathering detailed insights and metrics for react-native-circle-qrcode-svg
Gathering detailed insights and metrics for react-native-circle-qrcode-svg
Gathering detailed insights and metrics for react-native-circle-qrcode-svg
A QR Code generator for React Native based on react-native-svg and node-qrcode.
npm install react-native-circle-qrcode-svg
Typescript
Module System
Node Version
NPM Version
39.3
Supply Chain
28.9
Quality
66.3
Maintenance
50
Vulnerability
93.6
License
JavaScript (48.32%)
TypeScript (17.49%)
Ruby (10.31%)
Objective-C (8.7%)
Kotlin (8.47%)
Objective-C++ (6.72%)
Total Downloads
3,474
Last Day
2
Last Week
5
Last Month
49
Last Year
472
MIT License
1,111 Stars
352 Commits
222 Forks
44 Watchers
14 Branches
182 Contributors
Updated on Jun 05, 2025
Latest Version
6.1.12
Package Id
react-native-circle-qrcode-svg@6.1.12
Unpacked Size
156.51 kB
Size
91.07 kB
File Count
20
NPM Version
6.14.16
Node Version
16.14.0
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
-83.9%
5
Compared to previous week
Last Month
22.5%
49
Compared to previous month
Last Year
10.3%
472
Compared to previous year
2
3
A QR Code generator for React Native based on react-native-svg and javascript-qrcode.
Discussion: https://discord.gg/RvFM97v
Android | iOS |
---|---|
![]() | ![]() |
Install dependency packages
1yarn add react-native-svg react-native-qrcode-svg
Or
1npm i -S react-native-svg react-native-qrcode-svg
If you are using React Native 0.60.+
go to the folder your-project/ios and run pod install
, and you're done.
If not, use one of the following method to link.
react-native link
If you are using React Native <= 0.59.X
, link the native project:
1react-native link react-native-svg
1import QRCode from 'react-native-qrcode-svg'; 2 3// Simple usage, defaults for all but the value 4render() { 5 return ( 6 <QRCode 7 value="http://awesome.link.qr" 8 /> 9 ); 10};
1// 30px logo from base64 string with transparent background 2render() { 3 let base64Logo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAA..'; 4 return ( 5 <QRCode 6 value="Just some string value" 7 logo={{uri: base64Logo}} 8 logoSize={30} 9 logoBackgroundColor='transparent' 10 /> 11 ); 12};
1// 20% (default) sized logo from local file string with white logo backdrop 2render() { 3 let logoFromFile = require('../assets/logo.png'); 4 return ( 5 <QRCode 6 value="Just some string value" 7 logo={logoFromFile} 8 /> 9 ); 10};
1// get base64 string encode of the qrcode (currently logo is not included) 2getDataURL() { 3 this.svg.toDataURL(this.callback); 4} 5 6callback(dataURL) { 7 console.log(dataURL); 8} 9 10render() { 11 return ( 12 <QRCode 13 value="Just some string value" 14 getRef={(c) => (this.svg = c)} 15 /> 16 ); 17}
Name | Default | Description |
---|---|---|
size | 100 | Size of rendered image in pixels |
value | 'this is a QR code' | String Value of the QR code. Can also accept an array of segments as defined in Manual mode. Ex. [{ data: 'ABCDEFG', mode: 'alphanumeric' }, { data: '0123456', mode: 'numeric' }, { data: [253,254,255], mode: 'byte' }] |
color | 'black' | Color of the QR code |
backgroundColor | 'white' | Color of the background |
enableLinearGradient | false | enables or disables linear gradient |
linearGradient | ['rgb(255,0,0)','rgb(0,255,255)'] | array of 2 rgb colors used to create the linear gradient |
gradientDirection | [170,0,0,0] | the direction of the linear gradient |
logo | null | Image source object. Ex. {uri: 'base64string'} or {require('pathToImage')} |
logoSize | 20% of size | Size of the imprinted logo. Bigger logo = less error correction in QR code |
logoBackgroundColor | backgroundColor | The logo gets a filled quadratic background with this color. Use 'transparent' if your logo already has its own backdrop. |
logoMargin | 2 | logo's distance to its wrapper |
logoBorderRadius | 0 | the border-radius of logo image (Android is not supported) |
quietZone | 0 | quiet zone around the qr in pixels (useful when saving image to gallery) |
getRef | null | Get SVG ref for further usage |
ecl | 'M' | Error correction level |
onError(error) | undefined | Callback fired when exception happened during the code generating process |
Note: Experimental only ( not tested on iOS) , uses getRef() and needs RNFS module
npm install --save react-native-fs
1import { CameraRoll , ToastAndroid } from "react-native" 2import RNFS from "react-native-fs" 3... 4 5 saveQrToDisk() { 6 this.svg.toDataURL((data) => { 7 RNFS.writeFile(RNFS.CachesDirectoryPath+"/some-name.png", data, 'base64') 8 .then((success) => { 9 return CameraRoll.saveToCameraRoll(RNFS.CachesDirectoryPath+"/some-name.png", 'photo') 10 }) 11 .then(() => { 12 this.setState({ busy: false, imageSaved: true }) 13 ToastAndroid.show('Saved to gallery !!', ToastAndroid.SHORT) 14 }) 15 }) 16 }
If you like this project, please consider buy me a coffee :)
No vulnerabilities found.
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 9
Details
Reason
GitHub code reviews found for 6 commits out of the last 30 -- score normalized to 2
Details
Reason
0 commit(s) out of 30 and 0 issue activity out of 30 found in the last 90 days -- score normalized to 0
Reason
no badge detected
Reason
branch protection not enabled on development/release branches
Details
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
security policy file not detected
Reason
no update tool detected
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More