Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 823 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 823 Bytes

QR Code

QR Code encoding and rendering. Demo.

Basic Usage

import Html exposing (Html)
import QRCode
import Svg.Attributes as SvgA

qrCodeView : String -> Html msg
qrCodeView message =
    QRCode.fromString message
        |> Result.map
            (QRCode.toSvg
                [ SvgA.width "100px"
                , SvgA.height "100px"
                ]
            )
        |> Result.withDefault (Html.text "Error while encoding to QRCode.")

If you would like more functionalities, please open an issue on GitHub.

Thanks

Thank you Carolyn Eby, for creating this great tutorial on how QR Code works.

Thank you Evan for bringing joy to the frontend.