| title | Badges | ||
|---|---|---|---|
| description | Generate modern markdown badges with the npmx.dev API | ||
| navigation |
|
npmx.dev offers many different SVG badges with stats about any package via its API. You can get the Markdown code to display an accessible badge which links to the package URL on npmx.dev with the following interactive generator:
:badge-generator
- version: Shows the latest or specific version of the package. :img{src="https://img.shields.io/badge/%233b82f6-3b82f6" class="inline align-middle h-5 w-14"}
- license: Displays the package license (e.g., MIT, Apache-2.0). :img{src="https://img.shields.io/badge/%2322c55e-22c55e" class="inline align-middle h-5 w-14"}
- size: Shows the install size (via Bundlephobia) or unpacked size. :img{src="https://img.shields.io/badge/%23a855f7-a855f7" class="inline align-middle h-5 w-14"}
- downloads: Displays monthly download statistics. :img{src="https://img.shields.io/badge/%23f97316-f97316" class="inline align-middle h-5 w-14"}
- downloads-day: Displays daily download statistics. :img{src="https://img.shields.io/badge/%23f97316-f97316" class="inline align-middle h-5 w-14"}
- downloads-week: Displays weekly download statistics. :img{src="https://img.shields.io/badge/%23f97316-f97316" class="inline align-middle h-5 w-14"}
- downloads-month: Alias for monthly download statistics. :img{src="https://img.shields.io/badge/%23f97316-f97316" class="inline align-middle h-5 w-14"}
- downloads-year: Displays yearly download statistics. :img{src="https://img.shields.io/badge/%23f97316-f97316" class="inline align-middle h-5 w-14"}
- vulnerabilities: Shows the number of vulnerabilities found via OSV. :img{src="https://img.shields.io/badge/%2322c55e-22c55e" class="inline align-middle h-5 w-14"} / :img{src="https://img.shields.io/badge/%23ef4444-ef4444" class="inline align-middle h-5 w-14"}
- dependencies: Lists the total count of package dependencies. :img{src="https://img.shields.io/badge/%2306b6d4-06b6d4" class="inline align-middle h-5 w-14"}
- created: Displays the date the package was first published. :img{src="https://img.shields.io/badge/%2364748b-64748b" class="inline align-middle h-5 w-14"}
- updated: Displays the date of the most recent modification. :img{src="https://img.shields.io/badge/%2364748b-64748b" class="inline align-middle h-5 w-14"}
- engines: Shows the supported Node.js version range. :img{src="https://img.shields.io/badge/%23eab308-eab308" class="inline align-middle h-5 w-14"}
- types: Indicates if TypeScript types are included. :img{src="https://img.shields.io/badge/%233b82f6-3b82f6" class="inline align-middle h-5 w-14"} / :img{src="https://img.shields.io/badge/%2364748b-64748b" class="inline align-middle h-5 w-14"}
- maintainers: Displays the total count of package maintainers. :img{src="https://img.shields.io/badge/%2306b6d4-06b6d4" class="inline align-middle h-5 w-14"}
- deprecated: Shows if the package is active or deprecated. :img{src="https://img.shields.io/badge/%2322c55e-22c55e" class="inline align-middle h-5 w-14"} / :img{src="https://img.shields.io/badge/%23ef4444-ef4444" class="inline align-middle h-5 w-14"}
- quality: NPMS.io quality score based on linting and tests. :img{src="https://img.shields.io/badge/%23a855f7-a855f7" class="inline align-middle h-5 w-14"}
- popularity: NPMS.io popularity score based on downloads and stars. :img{src="https://img.shields.io/badge/%2306b6d4-06b6d4" class="inline align-middle h-5 w-14"}
- maintenance: NPMS.io maintenance score based on activity. :img{src="https://img.shields.io/badge/%23eab308-eab308" class="inline align-middle h-5 w-14"}
- score: The overall NPMS.io combined score. :img{src="https://img.shields.io/badge/%233b82f6-3b82f6" class="inline align-middle h-5 w-14"}
- name: Simple badge displaying the package name. :img{src="https://img.shields.io/badge/%2364748b-64748b" class="inline align-middle h-5 w-14"}
# Version Badge
[](https://npmx.dev/package/nuxt)
# License Badge
[](https://npmx.dev/package/vue)
# Monthly Downloads
[](https://npmx.dev/package/lodash)
# Scoped Package (Install Size)
[](https://npmx.dev/package/@nuxt/kit)
# Specific Version
[](https://npmx.dev/package/react)
# Quality Score
[](https://npmx.dev/package/pinia)You can further customize your badges by appending query parameters to the badge URL.
Use this generator to get the Markdown code you desire:
:badge-generator-parameters
::tip For a more advanced badges generator, check out this community website. ::
Overrides the default label text. You can pass any string to customize the label displayed on the left half of the badge.
- Default: Depends on the badge type (e.g., "version", "downloads/mo").
- Usage:
?label=YOUR_LABEL
Overrides the default value text of the badge. You can pass any string to customize the value displayed on the right half of the badge.
- Default: Calculated values depending on the badge type (e.g., "v4.2.0", "5.4M").
- Usage:
?label=YOUR_LABEL
Overrides the default label color. You can pass a standard hex code (with or without the # prefix). The label text color is automatically chosen (black or white) based on WCAG contrast ratio, so the badge remains readable.
- Default:
#0a0a0a - Usage:
?labelColor=HEX_CODE
Overrides the default strategy color. You can pass a standard hex code (with or without the # prefix). The text color is automatically chosen (black or white) based on WCAG contrast ratio, so the badge remains readable.
- Default: Depends on the badge type (e.g., version is blue, downloads are orange).
- Usage:
?color=HEX_CODE
| Example | URL |
|---|---|
| Hot Pink | .../badge/version/nuxt?color=ff69b4 |
| Pure Black | .../badge/version/nuxt?color=000000 |
| Brand Blue | .../badge/version/nuxt?color=3b82f6 |
When set to true, this parameter replaces the static category label (like "version" or "downloads/mo") with the actual name of the package. This is useful for brand-focused READMEs.
- Default:
false - Usage:
?name=true
| Type | Default Label | With name=true |
|---|---|---|
| Version | version | 3.12.0 |
nuxt | 3.12.0 |
| Downloads | downloads/mo | 2M |
lodash | 2M |
Overrides the default badge appearance. Pass shieldsio to use the shields.io-compatible style.
- Default:
default - Usage:
?style=shieldsio