diff --git a/README.md b/README.md index 1d11009d..86bc1d3f 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,9 @@ We are working continuously on adding support for more and more platforms. If yo ### Framework support The library can be easily used with several other frameworks, I have been adding examples for a few of them and would continue to add more. -|| | | | -| -------- | -------- | -------- | -------- | -------- | -| [Html5](./examples/html5) | [VueJs](./examples/vuejs) | [ElectronJs](./examples/electron) | [React](https://github.com/scanapp-org/html5-qrcode-react) | [Lit](./examples/lit) +|| | | | | +| -------- | -------- | -------- | -------- | -------- | -------- | +| [Html5](./examples/html5) | [VueJs](./examples/vuejs) | [ElectronJs](./examples/electron) | [React](https://github.com/scanapp-org/html5-qrcode-react) | [Lit](./examples/lit) | [Svelte](./examples/svelte) ### Supported Code formats Code scanning is dependent on [Zxing-js](https://github.com/zxing-js/library) library. We will be working on top of it to add support for more types of code scanning. If you feel a certain type of code would be helpful to have, please file a feature request. diff --git a/examples/svelte/README.md b/examples/svelte/README.md new file mode 100644 index 00000000..92c2db90 --- /dev/null +++ b/examples/svelte/README.md @@ -0,0 +1,54 @@ +# html5-qrcode with Svelte/SvelteKit + +## Creating a `svelte` component for `html5-qrcode` + +### Install the library in your project + +```bash +npm i html5-qrcode +``` + +### Create a `Scanner.svelte` component + +```svelte +// Scanner.svelte + + +
+``` + +### Use the component + +```svelte + + +
+ +
+``` diff --git a/examples/svelte/svelte.png b/examples/svelte/svelte.png new file mode 100644 index 00000000..34ec4ad8 Binary files /dev/null and b/examples/svelte/svelte.png differ