Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mantou132/qr-scan
custom element <qr-scan>
https://github.com/mantou132/qr-scan
custom-elements qrcode scanner webcomponents
Last synced: about 1 month ago
JSON representation
custom element <qr-scan>
- Host: GitHub
- URL: https://github.com/mantou132/qr-scan
- Owner: mantou132
- Created: 2019-12-15T16:59:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-01T08:00:42.000Z (over 4 years ago)
- Last Synced: 2024-10-18T02:31:41.982Z (3 months ago)
- Topics: custom-elements, qrcode, scanner, webcomponents
- Language: TypeScript
- Size: 1010 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ``
[Demo](https://mantou132.github.io/qr-scan/build/hello/)
## develop
install [rust](https://www.rust-lang.org/)
```bash
npm i
npm run example
```## usage
```html
```
```css
qr-scan::part(bound) {
outline-color: blue;
}
``````js
document.querySelector('qr-scan').addEventListener('success', console.log);
document.querySelector('qr-scan').addEventListener('notallow', console.log);
```### api
```js
import QrScan from 'qr-scan';
new QrScan(300, 300).detect().then(console.log);
```