New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-fast-qrcode

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fast-qrcode

Support for QRCode

latest
Source
npmnpm
Version
0.13.0
Version published
Maintainers
1
Created
Source

react-native-fast-qrcode

npm version npm downloads react-native

A customizable QRCode component for React Native, built with react-native-svg and qrcode .

✨ Features:

✅ Basic QR code rendering

🎨 Custom styles: square, circle, diamond, rounded

🌈 Gradient fill

🖼️ Logo overlay in center

🎯 Custom finder patterns (color, rounded corners)

Installation

yarn add react-native-fast-qrcode react-native-svg qrcode
# or
npm install react-native-fast-qrcode react-native-svg qrcode

📸 Preview

App Screenshot App Screenshot App Screenshot

Usage


import { View, StyleSheet, ScrollView } from 'react-native';
import { QRCode } from 'react-native-fast-qrcode';

export default function App() {
  return (
    <ScrollView>
      <View style={styles.container}>
        {/* Basic QR */}
        <QRCode value="https://example.com1" size={200} ecl="M" />

        {/* Circle style + gradient */}
        <QRCode
          value="https://example.com2"
          size={200}
          style="circle"
          gradient={{ from: '#ff512f', to: '#dd2476', direction: 'vertical' }}
        />

        {/* Diamond style + logo */}
        <QRCode
          value="https://example.com3"
          size={220}
          style="diamond"
          color="#0072ff"
          // logo={require('./assets/logo.png')}
          logoSize={50}
        />

        {/* Rounded + finder pattern custom */}
        <QRCode
          value="https://example.com4"
          size={240}
          style="rounded"
          cornerRadius={6}
          finderColor="#ff5722"
          finderRadius={8}
          gradient={{ from: '#43cea2', to: '#185a9d', direction: 'horizontal' }}
          // logo={require('./assets/logo.png')}
          logoSize={50}
          backgroundColor="white"
        />
      </View>
    </ScrollView>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    gap: 50,
    marginTop: 100,
  },
});

Props

PropTypeDefaultDescription
valuestringrequiredNội dung sẽ được encode trong QR Code
sizenumber200Kích thước QR code (chiều rộng & cao)
colorstringblackMàu của các ô QR
backgroundColorstringwhiteMàu nền phía sau QR
ecl'L' | 'M' | 'Q' | 'H''M'Mức độ Error Correction Level (sửa lỗi khi scan)
style'square' | 'circle' | 'diamond' | 'rounded''square'Hình dạng module QR
cornerRadiusnumber4Độ bo góc (áp dụng khi style="rounded")
gradient{ from: string; to: string; direction?: 'vertical' | 'horizontal' }undefinedGradient fill cho module QR
logostring | numberundefinedLogo ở giữa QR (hỗ trợ require() hoặc URL ảnh)
logoSizenumber40Kích thước logo (width & height)
finderColorstringsame as colorMàu Finder Pattern (3 ô vuông lớn của QR code)
finderRadiusnumber0Bo góc cho Finder Pattern

Keywords

react-native

FAQs

Package last updated on 17 Oct 2025

Did you know?

Socket

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.

Install

Related posts