Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-icon

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-icon

Icon web components

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
554
decreased by-3.65%
Maintainers
1
Weekly downloads
 
Created
Source

Icons

This package contains the AtlasKit icons. All icons can (and should be) be consumed separately.

Please note the license of this package is the Atlassian Design Guidelines - please see LICENSE for more information.

Try it out

Go to the ak-icon Storybook to try for yourself.

Setting up and installing

npm install ak-icon

Using the component

HTML

The ak-icon package exports the Icon Skate components.

Import the component in your JS resource:

bundle.js
import 'ak-icon/glyph/home';

Now you can use the defined tag in your HTML markup:

index.html
<html>
  <head>
    <script src="bundle.js"></script>
  </head>
  <body>
    <!-- ... -->
    <ak-icon-home></ak-icon-home>
  </body>
</html>

You can also use it from within another JavaScript resource:

import BitbucketLogo from 'ak-icon/glyph/bitbucket/logo';

const component = new BitbucketLogo();
document.body.appendChild(component);

Controlling the icon color

The fill color of an icon can be controlled via CSS:

<span style="color: red;">
  <ak-icon-home></ak-icon-home>
</span>

This package also provides all icons bundled in one export via:

bundle.js
import 'ak-icon';
index.html
<!-- ... -->
<ak-icon-home></ak-icon-home>
<ak-icon-bitbucket-logo></ak-icon-bitbucket-logo>

however keep in mind that this will pull in all icons, not only the ones you use, so it should mainly only be used for prototyping.

React

This is a standard web component, if you want to use it in your React app, use the Skate.js React integration.

import HomeIcon from 'ak-icon/glyph/home';
import reactify from 'skatejs-react-integration';

const ReactComponent = reactify(HomeIcon, {});

ReactDOM.render(<ReactComponent />, container);

FAQs

Package last updated on 21 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc