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

vue-dynamic-heroicons

v0.0.2

Published

A really simple Vue 3 component for dynamically loading the official Heroicons Vue components. Instead of using `<BeakerIcon />` you can use `<DynamicHeroicon name="beaker" />` which allows you to very easily dynamically load heroicons if you have a lot i

Downloads

64

Readme

Vue Dynamic Heroicon

A really simple Vue 3 component for dynamically loading the official Heroicons Vue components. Instead of using <BeakerIcon /> you can use <DynamicHeroicon name="beaker" /> which allows you to very easily dynamically load heroicons if you have a lot in the same place.

If you are only using a handful of icons, you're probably better off using the supplied originals as using this component will effectively load all heroicons.

However, if you're using lots of them in the same component/view, perhaps in a design system, and want the developer convienience of not having to import every single icon as a new component, this can help.

Installation

npm install vue-dynamic-heroicons

Usage

Register the component locally:

import { DynamicHeroicon } from 'vue-dynamic-heroicons';

export default {
  components: {
    DynamicHeroicon,
  },
};

Find the kebab-case name of the icon you to use from heroicons, and insert the component.

<DynamicHeroicon name="beaker" />
<DynamicHeroicon name="academic-cap" :outline="true" :size="6" />
<DynamicHeroicon name="cake" :outline="true" class="text-indigo-700" :size="8" />

Props

  • name Heroicon name in kebab-case – e.g. "academic-cap"
  • outline Boolean, if true outline style icons used, else default or false uses solid
  • size Number, which will be output as tailwind width and height classes with the same number. Defaults to h-4 and w-4, won't go lower than 4. If you're not using tailwind then set sizes using class or style.

About

I'd already made this basic component for a project I'm working on. I thought others might find it useful and I really wanted to publish my first bit of Open Source, mainly so I could learn/appreciate a bit more. Feedback and PRs welcome but please be gentle, I'm learning OSS!

Credits

@matthewmaribojoc's Learning Vue Paths @PCkelley's Florida Components Demo