1.0.0 • Published 10 months ago
@dgrammatiko/qr-element v1.0.0
QR Web component
Using https://github.com/Rich-Harris/headless-qr
Attributes/properties
input<string>: the string that the QR Code will be created forwidth<string>: the width (also height, qr codes are square) in px, ie150px
Styling
/**
* Set the color of the light parts of the QR Code
*/
qr-element.blue {
background-color: gold; /** Usually white */
}
/**
* Set the color of the dark parts of the QR Code
*/
qr-element.blue::part(canvas) {
--canvas-fill: blue; /** Usually black */
}1.0.0
10 months ago