QR Code
<bh-qr>
| BharatQRCode
The QR Code component renders a scannable QR image for the provided URL. The image is generated through an external API and updates dynamically when the value
or size
changes.
Basic Usage
<--Variation of value and size--!> <bh-qr value="Example" size="80"></bh-qr> <bh-qr value="https://example.com" size="120"></bh-qr>
import React from 'react'; import { BharatQRCode } from 'bharat-ui/react/components/qr';
function App() { return ( <BharatQRCode value="Example" size="80"></BharatQRCode> <BharatQRCode value="https://example.com" size="120"></BharatQRCode> ); } export default App;
Properties
Property | Type | Description |
---|---|---|
value | string | The data or URL to encode in the QR code |
size | number | Width and height (in pixels) of the QR code |