{"id":25735614,"url":"https://github.com/avaray/svg-barcode-generator","last_synced_at":"2026-06-11T06:31:41.587Z","repository":{"id":218077402,"uuid":"745526481","full_name":"Avaray/svg-barcode-generator","owner":"Avaray","description":"Barcode Generator compatible with Mobile, Browsers and JavaScript Runtimes","archived":false,"fork":false,"pushed_at":"2025-02-20T13:17:01.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-28T04:27:57.684Z","etag":null,"topics":["barcode","code","code-128","code128","ean","ean-13","ean13","generator","typescript","upc"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/svg-barcode-generator","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/Avaray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","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},"funding":{"github":"Avaray","patreon":"Avaray_","buy_me_a_coffee":"avaray","open_collective":"avaray"}},"created_at":"2024-01-19T14:27:14.000Z","updated_at":"2025-02-20T13:17:05.000Z","dependencies_parsed_at":"2024-01-19T16:08:56.291Z","dependency_job_id":"46344239-518c-4ee0-b4c9-5be1d9196815","html_url":"https://github.com/Avaray/svg-barcode-generator","commit_stats":null,"previous_names":["avaray/ts-barcode-generator","avaray/simple-barcode-generator","avaray/svg-barcode-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Avaray/svg-barcode-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fsvg-barcode-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fsvg-barcode-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fsvg-barcode-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fsvg-barcode-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avaray","download_url":"https://codeload.github.com/Avaray/svg-barcode-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avaray%2Fsvg-barcode-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34186385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["barcode","code","code-128","code128","ean","ean-13","ean13","generator","typescript","upc"],"created_at":"2025-02-26T05:31:19.010Z","updated_at":"2026-06-11T06:31:41.571Z","avatar_url":"https://github.com/Avaray.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Avaray","https://patreon.com/Avaray_","https://buymeacoffee.com/avaray","https://opencollective.com/avaray"],"categories":[],"sub_categories":[],"readme":"# SVG Barcode Generator\n\nSimple one-dimensional [barcode](https://en.wikipedia.org/wiki/Barcode) generator focused on scalability and\nthemability.\\\nCreated to be easy to use, lightweight, and compatible with [Tailwind CSS](Tailwind).\n\n## Supported code formats\n\n- [upc_a](https://en.wikipedia.org/wiki/Universal_Product_Code)\n- [ean_13](https://en.wikipedia.org/wiki/International_Article_Number)\n- [ean_8](https://en.wikipedia.org/wiki/International_Article_Number)\n- [code_128](https://en.wikipedia.org/wiki/Code_128)\n- [code_93](https://en.wikipedia.org/wiki/Code_93)\n- [code_39](https://en.wikipedia.org/wiki/Code_39)\n- [codabar](https://en.wikipedia.org/wiki/Codabar)\n- [itf](https://en.wikipedia.org/wiki/Interleaved_2_of_5)\n\n## Why to use this library\n\n- Creates responsive [SVG](https://en.wikipedia.org/wiki/SVG) graphics that adapt to parent container sizes.\n- Is [TailwindCSS](https://tailwindcss.com/) friendly (you can easily apply foreground and background colors).\n- Can be used in the browser ([ES2017](https://caniuse.com/?search=es2017)) and in runtimes such as\n  [Node](https://nodejs.org/), [Deno](https://deno.com/), and [Bun](https://bun.sh/).\n- Can be used in frameworks like [React](https://react.dev/), [Vue](https://vuejs.org/), [Svelte](https://svelte.dev/),\n  etc.\n- Can be used in [React Native](https://reactnative.dev/) and [Expo](https://expo.dev/). Should be compatible with\n  [NativeWind](https://www.nativewind.dev/) and [Unistyles](https://www.unistyl.es/).\n- Names of formats are compatible with\n  [Barcode Detection API formats](https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API#supported_barcode_formats).\n- Is dependency-free.\n- Is easy to use.\n\n## Why you shouldn't use this library\n\n- It has not been battle-tested yet. Might have bugs.\n- Whether the project will be developed further depends on my willingness to work.\n\n## Idea\n\nAmong the libraries available on [NPM](https://www.npmjs.com/), none met my needs. Some lacked\n[tree shaking](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking), others required complex configurations\njust to generate decent looking SVG, and some applied colors that couldn’t be easily overridden with Tailwind. So, I\ndecided to create my own library.\n\n## Usage\n\n#### Common\n\n```ts\nimport SvgBarcodeGenerator from \"svg-barcode-generator\";\n\nconst barcode = SvgBarcodeGenerator.generate(\"7423522549551\", \"ean_13\");\n\nconsole.log(barcode);\n```\n\n#### React + TailwindCSS\n\n```ts\nimport SvgBarcodeGenerator from \"svg-barcode-generator\";\n\nexport const YourComponent = () =\u003e {\n  const barcode = SvgBarcodeGenerator.generate(\"7423522549551\", \"ean_13\");\n  return (\n    \u003cdiv className=\"p-6 bg-white fill-current text-black\"\u003e\n      \u003cdiv dangerouslySetInnerHTML={{ __html: barcode }} /\u003e\n    \u003c/div\u003e\n  );\n};\n```\n\n## Materials you can check before use\n\n- [Color Selection for Barcode Symbols](https://www.barcode.graphics/upc-color-guide)\n- [Barcode Symbology](https://www.scandit.com/products/barcode-scanning/symbologies)\n- [Wikipedia.org/Barcode](https://en.wikipedia.org/wiki/Barcode)\n\n## TODO\n\n- [ ] Check ean_13 (seems to be broken)\n- [ ] Add support for upc_e (the last one of planned 1D formats)\n- [ ] Add automatic testing\n\n## Support the project\n\nIf you see potential in this project and want to help - feel free to contribute.\n\nYou can contact me on [LinkedIn](https://www.linkedin.com/in/wasowsky/) or Discord: `avaray_`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaray%2Fsvg-barcode-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favaray%2Fsvg-barcode-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favaray%2Fsvg-barcode-generator/lists"}