npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

showcar-icons

v0.7.2

Published

Showcar Icons for Showcar projects

Downloads

46

Readme

Showcar-icons

This module provides custom elements for simple inclusion of icons in your frontend project.

Installation:

To install showcar-icons within your project use npm.

$ npm i --save showcar-icons

How to include:

To make the custom elements available within you frontend, it is necessary to include some javascript (depending on your directory structure)

require("showcar-icons/dist/showcar-icons.min.js");

How to use:

use the following to include an icon in your frontend:

<as24-icon type="t-online"></as24-icon> <as24-icon type="flag/de"></as24-icon>

All the available icons are placed within the icons folder, using subfolder is possible too.
If you want to use the icons without the showcar-ui library, you have to load a polyfill for custom elements first.
See https://cdnjs.com/libraries/document-register-element

<script src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/0.5.4/document-register-element.js"></script>

Icon Sizing

If you only use showcar-icons you need to define the size of the icons with your own css code.

How to create different sizes

You can change the size of an svg by overriding css declarations.
Example:

as24-icon[type="navigation/car"] {
  svg {
    width: 42px;
    height: 34px;
  }
}

Sizing with ShowCarUI

If you include showcar-ui, all as24-icons have a default size of 16px x 16px. In case you need a different size, just set it for the as24-icon, the svg will fit the size:

as24-icon[type="navigation/car"] {
  width: 64px;
  height: 64px;
}

Inline Icons

We recommend to use inline icons if you need to include icons just on one single page. For further details see the docs and CSS-Tricks

How to contribute:

If you need some additional icons within showcar-icons just add them to the icons folder or another subfolder. Afterwards it is necessary to create the showcar-icons.min.js again.

$ yarn build

To test your changes run, it will open docs page on port 8080

$ yarn start

License

MIT License