https://github.com/pflaumenbaum/expo-native-qrcode
An expo native module for creating and displaying QR codes using the iOS CIFilter API and the Android ZXing library.
https://github.com/pflaumenbaum/expo-native-qrcode
expo expo-module expo-modules kotlin react-native swift
Last synced: 3 months ago
JSON representation
An expo native module for creating and displaying QR codes using the iOS CIFilter API and the Android ZXing library.
- Host: GitHub
- URL: https://github.com/pflaumenbaum/expo-native-qrcode
- Owner: Pflaumenbaum
- License: mit
- Created: 2025-03-30T08:59:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-15T20:05:11.000Z (about 1 year ago)
- Last Synced: 2025-06-27T14:02:03.220Z (about 1 year ago)
- Topics: expo, expo-module, expo-modules, kotlin, react-native, swift
- Language: Kotlin
- Homepage: https://www.npmjs.com/package/expo-native-qrcode
- Size: 550 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# expo-native-qrcode
Expo native module for creating and displaying QR codes using the iOS [`CIFilter`](https://developer.apple.com/documentation/coreimage/cifilter) API and the Android [`ZXing`](https://github.com/zxing/zxing) library.
## Installation
```
npm install expo-native-qrcode
```
After installation, you need to run `npx expo prebuild` or `pod install` because this package uses native code.
> This package does not work in Expo Go. You need to create a Dev-Client using **expo eas** or **prebuild**. [Instructions Dev-Client](https://docs.expo.dev/develop/development-builds/create-a-build/)
## Usage
### _Example:_ `QrCode Component`
```js
import React from 'react';
import { View, Text } from 'react-native';
import QrCode from 'expo-native-qrcode';
export function App() {
return (
expo-native-qrcode component example
);
}
```
### _Example:_ `JS Api`
```js
import {generateQrCode} from 'expo-native-qrcode'
[...]
const result = await generateQrCode("Hello World", 5);
```
## `generateQrCode()`
#### Parameters:
| Parameter | Type | Note |
| --------- | -------- | ------------------------------------------ |
| `data` | `string` | The string to encode into a QRCODE. |
| `size` | `string` | The resolution of the created QRCODE Image |
## ``
#### QrCode Props
| Prop | Type | Note |
| -------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------- |
| `data` | `string` | The string to encode into a QRCODE. |
| `size` | `number` | The size (width/height) of the QRCODE |
| `style?` | [`ViewStyle`](https://reactnative.dev/docs/view-style-props) | Custom Style options for the QRCODE component using React Native ViewStyle |
| `quality?` | `number` | The resolution of the created QRCODE Image - Default is 5 |
| `renderAbove?` | [`React.ReactNode`](https://reactnative.dev/docs/react-node) | A custom component to overlay above the QRCODE |
## License
[MIT](https://github.com/Pflaumenbaum/expo-native-qrcode/blob/main/LICENSE)