Giter Site home page Giter Site logo

heroicons-wc's Introduction

This package consist of a build script that generate web components for every heroicon.

Once generated, icon components are stored in individual files, with the following naming scheme: hi-<SIZE>-<NAME>.js, e.g: hi-20-solid-academic-cap.js, and are self-registered.

Installation

  1. Clone repo
  2. npm pack
  3. Move artifact to your project (e.g: in a vendor directory)
  4. Install (e.g: npm i vendor/heroicons-wc-x.x.x.tgz)

Usage

  1. Import the icon:
    import "heroicons-wc/hi-24-outline-shopping-cart.js";
  2. Use it like any html element:
    <hi-24-outline-shopping-cart></hi-24-outline-shopping-cart>

Typescript

The build script also generate declaration files for every component.

Files sizes

The generated files are not minified, but they are still lightweight:

compression min max average median
raw ~605B ~3089B ~1008B ~950B
gzip ~418B ~1300B ~594B ~575B
brotli ~299B ~1081B ~462B ~448B

Package Structure

heroicons-wc
├── hi-16-solid-academic-cap.js
├── hi-16-solid-academic-cap.d.ts
└── ...

License

This package (not the icons) is MIT licensed.

heroicons-wc's People

Contributors

malobre avatar

Stargazers

Patrick de Klein avatar

Watchers

 avatar

heroicons-wc's Issues

Publish the package to the NPM registry

Hi, nice implementation.

I did not yet find another library that delivers the heroicons as webcomponents. And since we use these already it would be very beneficial to install them from NPM.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.