{"id":14990285,"url":"https://github.com/sec-ant/wc-qr-code","last_synced_at":"2026-01-22T16:37:35.395Z","repository":{"id":188270822,"uuid":"678469449","full_name":"Sec-ant/wc-qr-code","owner":"Sec-ant","description":"A \u003cqr-code\u003e web component powered by Lit","archived":false,"fork":false,"pushed_at":"2024-06-25T01:57:02.000Z","size":243,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T03:17:36.411Z","etag":null,"topics":["lit","qr-code","qrcode","web-component"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@sec-ant/wc-qr-code/v/latest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sec-ant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-14T16:15:37.000Z","updated_at":"2023-08-22T12:55:56.000Z","dependencies_parsed_at":"2023-08-14T16:46:07.182Z","dependency_job_id":"7fa20a9a-e8cd-4da0-ae1e-ccc1ea74620e","html_url":"https://github.com/Sec-ant/wc-qr-code","commit_stats":null,"previous_names":["sec-ant/wc-qr-code"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fwc-qr-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fwc-qr-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fwc-qr-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sec-ant%2Fwc-qr-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sec-ant","download_url":"https://codeload.github.com/Sec-ant/wc-qr-code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968382,"owners_count":21025824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lit","qr-code","qrcode","web-component"],"created_at":"2024-09-24T14:19:49.593Z","updated_at":"2026-01-22T16:37:35.337Z","avatar_url":"https://github.com/Sec-ant.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @sec-ant/wc-qr-code\n\n[![release status](https://github.com/Sec-ant/wc-qr-code/actions/workflows/release.yml/badge.svg)](https://github.com/Sec-ant/wc-qr-code/actions/workflows/release.yml)\n\nA `\u003cqr-code\u003e` web component powered by [Lit](https://lit.dev/).\n\n## Install\n\n```bash\nnpm i @sec-ant/wc-qr-code\n```\n\n## Usage\n\nThis package does not bundle dependencies inside it, and is designed to be used with a build tool. For further information on this design decision, please check [this link](https://lit.dev/docs/tools/publishing/#don't-bundle-minify-or-optimize-modules).\n\nThis packages exports 3 import paths: `@sec-ant/wc-qr-code/pure`, `@sec-ant/wc-qr-code/side-effects` and `@sec-ant/wc-qr-code`.\n\n### `@sec-ant/wc-qr-code/pure`\n\nThis subpath exports the `QrCodeElement` class. You'll have to manually register it on the [`CustomElementRegistry`](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry) to use the web component.\n\nIn your script:\n\n```ts\nimport { QrCodeElement } from \"@sec-ant/wc-qr-code/pure\";\n\ncustomElements.define(\"qr-code\", QrCodeElement);\n```\n\nAfterwards, in your html file:\n\n```html\n\u003cqr-code value=\"Hello World!\"\u003e\u003c/qr-code\u003e\n```\n\nBefore https://github.com/WICG/webcomponents/issues/716 is resolved, you'll have to handle possible tag name collisions yourself.\n\nIf you use Typescript and wants `document.createElement(\"qr-code\")` to infer the `QrCodeElement` type for you, you should create a declaration file to augment the types:\n\n```ts\ndeclare global {\n  interface HTMLElementTagNameMap {\n    \"qr-code\": QrCodeElement;\n  }\n}\n```\n\n### `@sec-ant/wc-qr-code/side-effects`\n\nThis subpath will automatically register `QrCodeElement` on the `CustomElementRegistry` with the tag name `qr-code`, only if the tag name `qr-code` isn't already registered. `HTMLElementTagNameMap` will be automatically augmented.\n\nIn your script:\n\n```ts\nimport \"@sec-ant/wc-qr-code/side-effects\";\n```\n\nAfterwards, in your html file:\n\n```html\n\u003cqr-code value=\"Hello World!\"\u003e\u003c/qr-code\u003e\n```\n\n### `@sec-ant/wc-qr-code`\n\nThis works just like `side-effects` but also exports the `QrCodeElement` class.\n\n## Attributes\n\n### `value`\n\nThe value of the encoded QR code.\n\nDefault: \"\"\n\n### `ecc`\n\nError correction code level. Case-insensitive.\n\n- \"l\" or \"low\"\n- \"m\" or \"medium\"\n- \"q\" or \"quartile\"\n- \"h\" or \"high\"\n\nDefault: \"low\"\n\n### `border`\n\nSize of the quiet zone in module blocks.\n\nDefault: \"4\"\n\n### `scale`\n\nSize of one module block in pixels.\n\nDefault: \"8\"\n\n### `light-color`\n\nThe color of light module blocks.\n\nDefault: \"#fff\"\n\n### `dark-color`\n\nThe color of dark module blocks.\n\nDefault: \"#000\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fwc-qr-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsec-ant%2Fwc-qr-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsec-ant%2Fwc-qr-code/lists"}