analytics-icons
TypeScript icon, indicating that this package has built-in type declarations

5.5.0 • Public • Published

📈 Analytics Icons

This package helps you display the right icon for web browsers, operating systems, and device manufacturers. It's super useful if you're building an analytics product.

Travis CI GitHub Vulnerabilities Minzipped size NPM version Types

⭐ Getting started

Add Analytics Icons to your project:

npm install analytics-icons

Then import it in your project:

import icon from "analytics-icons"

And use the function with your product query:

const chrome = icon("Chrome"); // Returns a CDN image URL for the Google Chrome icon
const mac = icon("macOS");
 
// Add the image URL to an `img` tag
document.querySelector("img").setAttribute("src", mac);

You can also supply a fallback image:

const image = icon("ChromeUnknown", "generic-browser.png");

Or a dynamic fallback image:

const image = icon("ChromeUnknown", "http://server/fallback/{query}.png");

If you don't, we fallback to a Bing-powered image result for "{query} icon".

🎨 Examples

Chrome icon

Chrome

Safari icon

Safari

Firefox icon

Firefox

Opera icon

Opera

Edge icon

Edge

Vivaldi icon

Vivaldi

UC Browser icon

UC Browser

Windows icon

Windows

Android icon

Android

iOS icon

iOS

Linux icon

Linux

Apple icon

Apple

Samsung icon

Samsung

OnePlus icon

OnePlus

Windows icon

India

Windows icon

Netherlands

Windows icon

Brazil

Windows icon

United States

Windows icon

EU

Windows icon

Japan

Windows icon

Nepal

Windows icon

Fallback ("github")

Windows icon

Fallback ("gitlab")

Windows icon

Fallback ("bitbucket")

Windows icon

Fallback ("oswald labs")

Windows icon

Fallback ("microsoft")

Windows icon

Fallback ("google play")

Windows icon

Fallback ("y combinator")

📝 License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i analytics-icons

Weekly Downloads

10

Version

5.5.0

License

MIT

Unpacked Size

169 kB

Total Files

53

Last publish

Collaborators

  • anandchowdhary