# rntpc_react-native-barcode-builder **Repository Path**: openharmony-sig/rntpc_react-native-barcode-builder ## Basic Information - **Project Name**: rntpc_react-native-barcode-builder - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://gitee.com/openharmony-sig/rntpc_react-native-barcode-builder - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-14 - **Last Updated**: 2025-05-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🚨 **重要提示 | IMPORTANT** > > **⚠️ 此代码仓已归档。新地址请访问 [rntpc_react-native-barcode-builder](https://gitcode.com/openharmony-sig/rntpc_react-native-barcode-builder)。| ⚠️ This repository has been archived. For the new address, please visit [rntpc_react-native-barcode-builder](https://gitcode.com/openharmony-sig/rntpc_react-native-barcode-builder).** > --- > # react-native-barcode-builder React Native component to generate barcodes. Uses [JsBarcode](https://github.com/lindell/JsBarcode) for encoding of data. ## Getting started ### Step 1 This library uses [@react-native-community/art](https://github.com/react-native-community/art) to draw vector graphics. ### Step 2 Install `react-native-barcode-builder`: ```shell npm install react-native-barcode-builder --save ``` ### Step 3 Start using the component ```javascript import Barcode from "react-native-barcode-builder"; ; ``` You can find more info about the supported barcodes in the [JsBarcode README](https://github.com/lindell/JsBarcode#supported-barcodes). ![demo](./images/example.png) ## Properties | Property | Description | | ---------- | -------------------------------------------------- | | value | What the barcode stands for (required). | | format | Which barcode type to use (default: CODE128). | | width | Width of a single bar (default: 2) | | height | Height of the barcode (default: 100) | | text | Override text that is displayed. | | lineColor | Color of the bars and text (default: #000000) | | background | Background color of the barcode (default: #ffffff) | | onError | Handler for invalid barcode of selected format |