1.0.1 • Published 2 years ago

advanced-react-native-qrcode-mask v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-qrcode-mask

React Native QR Code Mask Component for IOS and Android


CircleCI Version MIT License All Contributors PRs Welcome

Installation

yarn add react-native-qrcode-mask

or

npm install react-native-qrcode-mask

Usage

import React, { useState } from 'react';
import { View, StyleSheet } from 'react-native';
import Camera from 'react-native-camera';
import QrCodeMask from 'react-native-qrcode-mask';

function App() {
  return (
    <View style={styles.container}>
      <Camera>
        <QrCodeMask
          // lineColor='green'
          lineDirection='horizontal'
          height={80}
          edgeColor='red'
          topTitle='Bar Code Scanner'
          bottomTitle='Put the barcode into the box'
        />
      </Camera>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingHorizontal: 16,
  },
});

export default App;

Property

PropertyTypeDefaultDescription
widthnumber260
heightnumber200
overlayOpacitynumber0.6
showLineAnimatedbooleantrue
lineThicknumber2
lineSizenumber \| string80%
lineBorderRadiusnumber2
lineColorstringgreen
lineAnimationDurationnumber1500ms
lineDirection'vertical' \| 'horizontal'vertical
edgeWidthnumber20
edgeHeightnumber20
edgeColorstringwhite
edgeBorderWidthnumber2
topTitlestringundefined
topTitleColorstringwhite
topTitleStyleTextStyleundefined
viewTopTitleStyleViewStyleundefined
renderTop() => React.ReactNodeundefined
bottomTitlestringundefined
bottomTitleColorstringwhite
bottomTitleStyleTextStyleundefined
viewBottomTitleStyleViewStyleundefined
renderBottom() => React.ReactNodeundefined
renderFrame() => React.ReactNodeundefined

Credits