Loading...
Loading...
Generate, customize, and export barcodes in React using Syncfusion BarcodeGenerator. Trigger for requests involving Code39 or Code128 barcodes, QR codes, Data Matrix generation, barcode styling (size, color, text, margins), React component setup, props or events, SVG or canvas rendering, and exporting or printing barcode images.
npx skill4agent add syncfusion/react-ui-components-skills syncfusion-react-barcodeimport React from 'react';
import { BarcodeGeneratorComponent } from '@syncfusion/ej2-react-barcode-generator';
export default function App() {
return (
<BarcodeGeneratorComponent
id="barcode"
type="Code39"
value="SYNCFUSION"
width="200px"
height="150px"
/>
);
}import React from 'react';
import { QRCodeGeneratorComponent } from '@syncfusion/ej2-react-barcode-generator';
export default function App() {
return (
<QRCodeGeneratorComponent
id="qrcode"
value="https://www.syncfusion.com"
width="200px"
height="200px"
/>
);
}import React from 'react';
import { DataMatrixGeneratorComponent } from '@syncfusion/ej2-react-barcode-generator';
export default function App() {
return (
<DataMatrixGeneratorComponent
id="datamatrix"
value="Syncfusion"
width="200px"
height="200px"
/>
);
}const [barcodeValue, setBarcodeValue] = React.useState('DEFAULT123');
<BarcodeGeneratorComponent
type="Code128"
value={barcodeValue}
width="200px"
height="150px"
/>const barcodeRef = React.useRef();
const handleExport = () => {
barcodeRef.current.exportImage('barcode', 'PNG');
};
<div>
<BarcodeGeneratorComponent
ref={barcodeRef}
type="Code39"
value="SYNC123"
width="200px"
height="150px"
/>
<button onClick={handleExport}>Download Barcode</button>
</div><div style={{ padding: '20px', border: '1px solid #ddd' }}>
<QRCodeGeneratorComponent
value="https://example.com"
width="250px"
height="250px"
foreColor="#333"
backgroundColor="#fff"
/>
</div>| Prop | Description | Used By |
|---|---|---|
| Barcode type (Code39, Code128, Code11, Code32, Code93, Codabar) | BarcodeGeneratorComponent |
| Data to encode | All generators |
| Barcode width (string with px) | All generators |
| Barcode height (string with px) | All generators |
| Dark/bar color | All generators |
| Light/space color | All generators |
| Object to customize display text | All generators |
| Unique component identifier (required for export) | All generators |