https://github.com/webtimo-de/ng-qrcode-svg
https://github.com/webtimo-de/ng-qrcode-svg
angular angular-qr-code angular-qrcode ngx qr-code qrcode qrcode-generator svg vector vector-graphics
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/webtimo-de/ng-qrcode-svg
- Owner: webtimo-de
- Created: 2023-09-29T09:36:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-02T22:06:43.000Z (over 1 year ago)
- Last Synced: 2024-03-14T19:18:15.421Z (about 1 year ago)
- Topics: angular, angular-qr-code, angular-qrcode, ngx, qr-code, qrcode, qrcode-generator, svg, vector, vector-graphics
- Language: JavaScript
- Homepage: https://npmjs.com/package/ng-qrcode-svg
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ng-qrcode-svg
[](https://www.npmjs.com/package/ng-qrcode-svg)

[](https://github.com/webtimo-de/ng-qrcode-svg/blob/master/LICENSE)> Simple QR code generator (SVG only) for Angular
## Install 🌐
```bash
npm install ng-qrcode-svg
```## Demo 🧑💻
You can test it here:
https://projects.web-timo.de/preview/ng-qrcode-svg
## Usage 🔥
1. Import module `QrcodeSvgModule`
```ts
import {NgModule} from '@angular/core';
import {QrcodeSvgModule} from 'ng-qrcode-svg';@NgModule({
imports: [
QrcodeSvgModule // import QrcodeSvgModule
]
})
export class MyModule {
}
```2. Use the `qrcode-svg` component which will render a QR code in SVG format
```html
```
## Component Properties
| Name | Description | Default |
|---------------------------------------------------------|-----------------------------------------------------------|-----------|
| @Input() value: string | The value which need to be encoded | undefined |
| @Input() ecl: 'low' \| 'medium' \| 'quartile' \| 'high' | Error correction level | medium |
| @Input() borderSize: number | The padding between the edge and the QR code (quiet zone) | 2 |
| @Input() size: string \| number | The size of the QR code SVG (css format) | 250px |
| @Input() backgroundColor: string | The 'path' color (background) | #FFFFFF |
| @Input() foregroundColor: string | The 'rect' color (foreground) | #000000 |
| @Input() alt: string \| undefined | HTML alt attribute | undefined |
| @Input() ariaLabel: string \| undefined | HTML aria-label attribute | undefined |---
## @larscom/ng-qrcode-svgThis is a renewed variant of the [@larscom/ng-qrcode-svg](https://github.com/larscom/ng-qrcode-svg). This runs on
Angular 16 and Ivy. I personally use the library, and it is therefore regularly maintained.You can find more information in the original project:
[github.com/larscom/ng-qrcode-svg](https://github.com/larscom/ng-qrcode-svg/blob/master/README.md)