SpawnDev.Blazor.QRCodeRenderer is a pure C# QRCode renderer for Blazor based on the awesome QRCoder project.
The QRCode is generated in pure C# without any dependencies.
Add SpawnDev.Blazor.QRCodeRenderer Nuget package to your Blazor project
Image QRCode renderer
<QRCodeImage DarkColor="darkgreen" DataText="Hello world!" QRRenderMode="QRRenderMode.ImageElementPng" />
SVG QRCode renderer
<QRCodeImage DarkColor="darkgreen" DataText="Hello world!" QRRenderMode="QRRenderMode.SvgElement" />
- string - Text data that will be used for the QRCode if not null
- byte[] - Binary data that will be used for the QRCode if not null
- DataTextType - DataTextType indicates how DataText should be processed before rendering
- string - Style to apply to the img/svg element
- ECCLevel - Error Correction Level
- int - The pixel size each b/w module is drawn
- bool - If true a white border is drawn around the whole QR Code
- string - The color of the dark/black modules in html notation
- string - The color of the light/white modules in html notation
- bool - If true (default) a DataTextType.UriRelativeUrl DataText URL will automatically be updated when a NavigationManager.LocationChanged event fires
- QRRenderMode - The mode to use when rendering the QRCode