Socket
Socket
Sign inDemoInstall

@a2000/icons

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @a2000/icons

A2K Icons


Version published
Maintainers
1
Created

Readme

Source

Icons

Quick Start

  1. Begin by installing with your favourite package manager:

npm install @a2000/icons

  1. Use within your HTML templates as follows:
<!DOCTYPE html>
<html>
  <head>
    <title>Quick Start</title>
    <meta charset="UTF-8" />
  </head>

  <body>
    <!-- Use web components in your HTML like regular built-in elements. -->
    <a2k-icon icon="{iconId}" />

    <!-- a2k web components use standard JavaScript modules. -->
    <script type="module">
      import "@a2000/icons/a2k-icons.js";
    </script>
  </body>
</html>

Available Icons

IconId
Documentsdocuments-icon
Helphelp-icon
Networknetwork-icon
Twittertwitter-icon
Windowswindows-icon
GitHubgithub-icon
Crosscross-icon
Internetinternet-icon
Infoinfo-icon
Shut Downshut-down-icon
Chevronchevron-icon

Notes

Changing size of icon

The size of the icon is determined by its inherited font-size. To change the font-size, adjust the font-size of its containing element.

Example:

<span className="large-icon">
  <a2k-icon icon="{iconId}" />
  Icon Label
</span>
.large-icon {
  font-size: 2rem;
}

Troubleshooting

If you're using Vite for your development environment, you may come across the following issue:

Uncaught TypeError: Failed to construct 'URL': Invalid URL at A2kIcon.js

This is due to a known issue with Vite. It appears that import.meta.url is not made available to dependencies that have been optimised when developing. The behaviour seems to work as normal when building the prod bundle.

To prevent this issue, we need to ask Vite to not optimise this particular package. Add the following to your vite.config.js file:

optimizeDeps: {
  exclude: ["@a2000/icons"],
},
```.

FAQs

Last updated on 12 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc