QRCode
@rockshin/tao-uiGenerate scannable Canvas or SVG QR codes with icons, status and refresh controls.
The added API follows Ant Design 6.7.0; appearance, theming and Semantic DOM use tao-ui. Existing component APIs remain unchanged.
Examples
Canvas and SVG
Canvas supports bitmap export; SVG scales without losing detail.
Dynamic value
The code re-encodes when the value changes. Empty strings render no code.
Error correction
L, M, Q and H provide different recovery levels. Center icons usually need a higher level.
L
M
Q
H
Status and refresh
Expired codes show a refresh action. Loading and scanned states also cover the code.
Colors and quiet zone
Keep high contrast. marginSize reserves the quiet zone in QR modules.
Center icon
iconSize accepts one size or separate dimensions. A data URL avoids an external request.
Download PNG
Use the public ref to export the canvas. Cross-origin icons require a suitable CORS response.
Custom status
statusRender receives status, translated text and the refresh callback.
Phone and locale
size controls dimensions; status text follows the provider locale.