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

@parameter1/base-cms-marko-web-icons

v4.36.8

Published

Vue/Marko icon components for BaseCMS websites

Downloads

4,741

Readme

BaseCMS Marko/Vue Icon Components

Icon components for BaseCMS websites.

Install

Add @parameter1/base-cms-marko-web-icons as a dependency to your website project.

Usage

Icons can be used on the server (as a Marko component) or the browser (as a Vue component).

On The Server

Call the <marko-web-icon> component within your Marko template. The name input/attribute is required. For example:

<!-- Your template file -->
<marko-web-icon name="alert" />

See the svg folder for a complete list of available icons.

Optional input/attributes:

  • tag: changes the wrapping HTML element. Default <span>
  • blockName: changes the wrapping BEM block class. Default marko-web-icon
  • modifiers: additional BEM modifiers (as an array) to apply the icon wrapper. Default []
  • class: an additional class name string to apply to the icon wrapper. Default undefined

In The Browser

Import the icon component into your Vue component and then use it within your template. For example:

// Your Vue component
<template>
  <icon-alert />
</template>
<script>
import IconAlert from '@parameter1/base-cms-marko-web-icons/browser/alert.vue';

export default {
  components: { IconAlert },
  // The rest of your component...
}
</script>

See the browser folder for a complete list of available icons (mirrors the svg folder).

Optional props:

  • tag: changes the wrapping HTML element. Default <span>
  • blockName: changes the wrapping BEM block class. Default marko-web-icon
  • modifiers: additional BEM modifiers (as an array) to apply the icon wrapper. Default []
  • className: an additional class name string to apply to the icon wrapper. Default null

Importing Styles (SASS/SCSS)

This package comes with baseline SASS variables and styles. To use them, import them into your website's style file:

// Your main website styles file.

// Override any desired variables here...

@import "[path-to-node_modules]/marko-web-icons/scss/icons";

By default, a width/height of 1rem will be applied to all icons classed with marko-web-icon (applied by default). In addition, the SVG will be filled with black and a ease transition will be applied. Additional (optional) modifiers include:

  • md
  • lg
  • xl
  • light
  • dark
  • shadow

For example, for a light, extra large icon with drop shadow, you would call the icon as follows:

// In Vue:
<template>
  <icon-alert modifiers=["xl", "light", "shadow"] />
</template>
// In Marko:
<marko-web-icon name="alert" modifiers=["xl", "light", "shadow"] />

Finally, any icon not specifically set to light or dark that also matches a brand (e.g. facebook) will have its brand color applied. See the $marko-web-icon-brand-colors map variable within scss/_variables.scss for a list of supported brands.

Development

Anytime a new icon svg file is added (or the wrapping Vue component template changes), run the build.js file found in the project root. This will generate a new Vue file for the icon.

Icon Sources

The icons used in this library are sourced from: