by dennishzg

dennishzg /console-badge

🎨 Create simple badges in the browser console

128 Stars 2 Forks Last release: 4 months ago (v1.3.1) MIT License 98 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

🎨 console-badge

Create simple badges in the browser console.

Tiny, easy-to-use package. No dependencies.

VersionDownloadsnpm bundle sizeLicense

Build StatusJavaScript Standard Code Style


  • Tiny: Less than 1kB (minified and gzipped). No dependencies. ES5-compliant code.
  • Customizable: Change the font colors, background colors and texts. Tip: You can use the popular badge style. 😎
  • Flexible: Support for console.log / .warn / .error / .info.


$ npm install console-badge # OR $ yarn add console-badge


Edit on CodeSandbox

import \* as consoleBadge from 'console-badge'; consoleBadge.log({ mode: '', leftText: 'console-badge', rightText: 'hello world πŸš€', rightBgColor: '#ffc107', rightTextColor: '#1a1a1a' }); consoleBadge.log({ leftText: '😎 Check out our code here:', leftTextColor: '#000', leftBgColor: '#ddd', rightText: '', rightBgColor: '#000' });

πŸ’‘ Please take a look at the API documentation to find out what the different options do and which other console types are supported.


CDN jsDelivr Hits

For prototyping or learning purposes, you can use the latest version with:

<script src=""></script>

For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:

<script src="[email protected]/dist/console-badge.umd.min.js"></script>
// Global variable consoleBadge.log(); // Property in the window object window.consoleBadge.log();

⚠ NPM is the recommended installation method. It pairs nicely with module bundlers such as webpack.


Show your support

Please ⭐️ this repository if this project helped you!


Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.


Detailed changes for each release are documented in the release notes.


Please make sure to read the Contributing Guide before making a pull request.

Thank you to all the people who have already contributed to this project!



Copyright (c) 2019-present, Dennis Herzberg

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.