Skip to main content

createQR

Callable

  • createQR(url: string, size?: number, background?: string, color?: string): QRCodeStyling

  • Create a QR code from a Solana Pay URL.


    Parameters

    • url: string

      The URL to encode in the QR code.

    • size: number = 512

      Size of canvas in px.

    • background: string = 'white'

      Background color for QR code.

    • color: string = 'black'

      Color for QR code pattern.

    Returns QRCodeStyling