{"id":13407995,"url":"https://github.com/badgen/badgen","last_synced_at":"2026-05-10T04:06:37.284Z","repository":{"id":35002354,"uuid":"138397923","full_name":"badgen/badgen","owner":"badgen","description":"Fast handcraft svg badge generator.","archived":false,"fork":false,"pushed_at":"2023-10-17T17:12:40.000Z","size":857,"stargazers_count":533,"open_issues_count":8,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-19T09:11:45.150Z","etag":null,"topics":["badge","badgen","fast","generator","readme","svg"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-06-23T12:03:51.000Z","updated_at":"2024-04-24T05:00:29.000Z","dependencies_parsed_at":"2024-01-14T16:30:06.957Z","dependency_job_id":"3fbabf81-e11f-4b7e-bfa5-54fdf2ab65a8","html_url":"https://github.com/badgen/badgen","commit_stats":null,"previous_names":["amio/badgen"],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgen%2Fbadgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgen%2Fbadgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgen%2Fbadgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgen%2Fbadgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badgen","download_url":"https://codeload.github.com/badgen/badgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226215,"owners_count":20904465,"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":["badge","badgen","fast","generator","readme","svg"],"created_at":"2024-07-30T20:00:50.035Z","updated_at":"2026-05-10T04:06:37.278Z","avatar_url":"https://github.com/badgen.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized","Badges and stickers"],"sub_categories":["Uncategorized"],"readme":"# badgen\n\n[![npm version][npm-src]][npm-href]\n[![Coverage Status][coveralls-src]][coveralls-href]\n[![Bundle size][bundlephobia-src]][bundlephobia-href]\n[![License][license-src]][license-href]\n\nFast handcraft svg badge generator. Used on [badgen.net](https://badgen.net).\n\n- 🌀 Zero dependency\n- ⚡️ Fast by design (see [benchmarks](#benchmarks))\n- 👯‍ Running in node \u0026 browser\n\n## Usage\n\n`npm install badgen`\n\n```javascript\nconst { badgen } = require('badgen')\n\n// only `status` is required.\nconst svgString = badgen({\n  label: 'npm',      // \u003cText\u003e\n  labelColor: 'ADF', // \u003cColor RGB\u003e or \u003cColor Name\u003e (default: '555')\n  status: 'v1.2.3',  // \u003cText\u003e, required\n  color: 'blue',     // \u003cColor RGB\u003e or \u003cColor Name\u003e (default: 'blue')\n  style: 'flat',     // 'flat' or 'classic' (default: 'classic')\n  icon: 'data:image/svg+xml;base64,...', // Use icon (default: undefined)\n  iconWidth: 13,     // Set this if icon is not square (default: 13)\n  scale: 1           // Set badge scale (default: 1)\n})\n```\n\n```javascript\nimport { badgen } from 'badgen'\n```\n\nAvailable color names:\n\n![](https://badgen.net/badge/color/blue/blue)\n![](https://badgen.net/badge/color/cyan/cyan)\n![](https://badgen.net/badge/color/green/green)\n![](https://badgen.net/badge/color/yellow/yellow)\n![](https://badgen.net/badge/color/orange/orange)\n![](https://badgen.net/badge/color/red/red)\n![](https://badgen.net/badge/color/pink/pink)\n![](https://badgen.net/badge/color/purple/purple)\n![](https://badgen.net/badge/color/grey/grey)\n![](https://badgen.net/badge/color/black/black)\n\n### In browser\n\n```html\n\u003cscript src=\"https://unpkg.com/badgen\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var svgString = badgen({ /*...*/ })\n\u003c/script\u003e\n```\n\n## Benchmarks\n\n`npm run bench` on iMac 5K (Late 2014), 3.5G i5, with Node.js 12.11.0:\n\n```bash\n[classic] style, long params x 985,898 ops/sec ±0.37% (94 runs sampled)\n[classic] style, full params x 1,284,886 ops/sec ±0.42% (95 runs sampled)\n[classic] style, with emoji  x 1,291,768 ops/sec ±0.28% (95 runs sampled)\n[classic] style, with icon   x 1,177,120 ops/sec ±0.94% (95 runs sampled)\n   [flat] style, long params x 780,504 ops/sec ±0.39% (94 runs sampled)\n   [flat] style, full params x 1,012,111 ops/sec ±0.40% (97 runs sampled)\n   [flat] style, with emoji  x 1,013,695 ops/sec ±0.91% (95 runs sampled)\n   [flat] style, with icon   x 994,481 ops/sec ±0.30% (94 runs sampled)\n```\n\n## Development\n\n- `npm test` builds `dist/` and runs the suite with Node's native test runner.\n- `npm run snaptests` updates the checked-in snapshots.\n- `npm run preview` starts the Vite preview app with live reload at `http://localhost:5173/`.\n\n## See Also\n\n- [gradient-badge][gradient-badge] - Badge generator with color gradient support\n\n[npm-src]: https://badgen.net/npm/v/badgen\n[npm-href]: https://www.npmjs.com/package/badgen\n[bundlephobia-src]: https://badgen.net/bundlephobia/minzip/badgen\n[bundlephobia-href]: https://bundlephobia.com/result?p=badgen\n[coveralls-src]: https://badgen.net/coveralls/c/github/amio/badgen/master\n[coveralls-href]: https://coveralls.io/github/amio/badgen?branch=master\n[license-src]: https://badgen.net/github/license/amio/badgen\n[license-href]: LICENSE.md\n[gradient-badge]: https://github.com/bokub/gradient-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadgen%2Fbadgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadgen%2Fbadgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadgen%2Fbadgen/lists"}