npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-custom-qr-codes

v2.0.0

Published

A customisable QR code component for React Native applications.

Downloads

1,387

Readme

react-native-custom-qr-codes

Installation

npm install react-native-custom-qr-codes

If you are not using Expo, you will also have to manually link the react-native-svg library.
Follow the instructions here to do this.

Usage

import { QRCode } from 'react-native-custom-qr-codes';

<QRCode content='https://reactnative.com'/>

Properties

| Prop | Description | Default | |---|---|---| |content|The String to be encoded in the QR code. |'No Content'| |codeStyle|The style of the centre QR Code pieces. |square| |outerEyeStyle|The style of the outside of the QR Code's eyes. |square| |innerEyeStyle|The style of the inside of the QR Code's eyes. |square| |size|The width & height of the component. |250| |color|The color of the QR Code. |black| |backgroundColor|The background color of the component. |white| |padding|The padding between the edge of the component and the QR Code itself (In terms of QR code piece sizes). |1| |logo|The image to be put in the centre of the QR Code.Must use a higher ecl for QR Code to work with a logo. (L->M->Q->H) |none| |logoSize|The size of the logo in the QR Code. |none| |linearGradient|The two colors to be used for the linear gradient for the foreground. |none| |gradientDirection|The numbers that define the orientation of the linear gradient. |[0,0,170,0]| |backgroundImage|The image to be used as the filling of the QR Code pieces.The Eyes can not be styled if a background image is used.|none| |ecl|The error correction level of the QR Code. |L|

Examples

codeStyle

<QRCode codeStyle='square' />
<QRCode codeStyle='circle' />
<QRCode codeStyle='dot' />
<QRCode codeStyle='diamond' />
<QRCode codeStyle='sharp' />

outerEyeStyle

<QRCode outerEyeStyle='square' />
<QRCode outerEyeStyle='circle' />
<QRCode outerEyeStyle='diamond' />

innerEyeStyle

<QRCode innerEyeStyle='square' />
<QRCode innerEyeStyle='circle' />
<QRCode innerEyeStyle='diamond' />

logo

<QRCode logo={require('./dab.png')} />

linearGradient

<QRCode linearGradient={['rgb(255,0,0)','rgb(0,255,255)']} />
<QRCode linearGradient={['rgb(255,0,0)','rgb(0,255,255)']} gradientDirection={[0,170,0,0]} />

backgroundImage

<QRCode backgroundImage={require('./galaxy.png')} />

Contributing

Take a look at CONTRIBUTING.md 😁

License

MIT License. © Geoffrey Natin 2017