
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
zebra-striped
Advanced tools
Generate barcodes natively in React Native with the ZXing library underhood!
Generate barcodes natively in React Native with the ZXing library underhood!
When I was working on generating QR codes in one of the apps for a client, I realized that JS-based libraries like BWIP JS are not very performant in React Native apps, where performance is especially important for keeping users happy.
I decided to experiment a little and learn about Expo Native Modules, Swift, and Kotlin. This led to the creation of zebra-striped - a performant, native-based library for generating various types of barcodes for React Native.
Feedback is highly appreciated!
1D Codes | 2D Codes |
---|---|
Code 128 | QR |
Code 39 | PDF417 |
Code 93 | Aztec |
Codabar | Data Matrix |
EAN-13 | |
EAN-8 | |
ITF | |
UPC-E | |
UPC-A |
Here's a basic usage of ZebraCode component:
<ZebraCode
value={"I'm very striped!"}
format="qr"
size={{ width: 300, height: 300 }}
/>
Want a custom colors? π¨ I've got you covered:
<ZebraCode
value={"I'm very striped!"}
format="qr"
size={{ width: 300, height: 300 }}
onColor="#141414"
offColor="#ffffff"
/>
(Colors are accepted only in HEX)
Or maybe you just want to have a data returned in Base64 format? Here's how you can do it:
const base64Image = getBase64Code("I'm base64'ed!", "qr", {
width: 300,
height: 300,
});
const base64Image = getBase64Code("I'm custom-colored!", "qr", {
width: 300,
height: 300
}, "#141414", #ffffff);
npm install zebra-striped
After installation you'll need to rebuild your dev client. Zebra π¦ will not work in Expo Go!
For plain React Native project you must install and configure expo
package, follow the "Install Expo modules in an existing React Native project" article.
Make sure to run pod install
in ios
folder.
Contributions are very welcome, I'm open for any suggestions!
FAQs
Generate barcodes natively in React Native with the ZXing library underhood!
The npm package zebra-striped receives a total of 205 weekly downloads. As such, zebra-striped popularity was classified as not popular.
We found that zebra-striped demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.