For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/qr-code.md.
v0.0.57
  • English
  • QRCode

    Data Display@rockshin/tao-ui

    Generate 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.

    TSX

    Dynamic value

    The code re-encodes when the value changes. Empty strings render no code.

    TSX

    Error correction

    L, M, Q and H provide different recovery levels. Center icons usually need a higher level.

    L

    M

    Q

    H

    TSX

    Status and refresh

    Expired codes show a refresh action. Loading and scanned states also cover the code.

    QR code expired
    TSX

    Colors and quiet zone

    Keep high contrast. marginSize reserves the quiet zone in QR modules.

    TSX

    Center icon

    iconSize accepts one size or separate dimensions. A data URL avoids an external request.

    QR-Code
    TSX

    Download PNG

    Use the public ref to export the canvas. Cross-origin icons require a suitable CORS response.

    TSX

    Custom status

    statusRender receives status, translated text and the refresh callback.

    TSX

    Phone and locale

    size controls dimensions; status text follows the provider locale.

    390 × 640
    TSX

    API

    QRCode

    PropertyDescriptionTypeDefault Value