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

taro-code-2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taro-code-2

Taro.js barcode & qrcode

latest
npmnpm
Version
2.3.0
Version published
Maintainers
1
Created
Source

Taro Code

QRCode & Barcode component for Taro.js, inspired by wx-base64-qrcode and wxbarcode. Components will generate base64 qrcode/barcode image.

Getting Started

Install

yarn add taro-code@2
# or
npm install taro-code@2

Usage

import Taro from '@tarojs/taro'
import { Barcode, QRCode } from 'taro-code'

class Code extends Taro.Component {
  render() {
    return (
      <View>
        <Barcode text='hello' width={300} height={60} scale={4} />
        <QRCode
          text='world'
          size={300}
          scale={4}
          errorCorrectLevel='M'
          typeNumber={2}
        />
      </View>
    )
  }
}

Props

Barcode

PropTypeDefault
textstring''
widthnumber300
heightnumber80
scalenumber4

QRCode

PropTypeDefault
textstring''
sizenumber300
scalenumber4
typeNumbernumber2
errorCorrectLevelstring'M'
foregroundColorstring#000000
backgroundColorstring#ffffff

FAQs

Package last updated on 12 Jan 2022

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