Home

Awesome

AkarIcons Web Components

Built With Stencil

AkarIcons Web Components is a non-official Web Components wrapper for the amazing AkarIcons.

Also a handy icon framework for dynamically customizable icons.

Features

Read more about the design philosophies in this article! 📄

Getting Started

<script src="https://cdn.jsdelivr.net/npm/akar-icons-web-components" type="module"></script>

<body>
  <akar-icon name="bicycle">
</body>

And voilà, the icon is ready.

Play around with the CodePen.

Advanced Usage

Appetizer

Note on the top right corner of the CodePen, there is a dropdown menu. Open and have fun with it.

Value for the name field can be copied from AkarIcons homepage without the ai- prefix, eg. arrow-left

Main Course

Everything the menu changes, is simply attributes for the <akar-icon> tag.

So <akar-icon name="air" size="50"> will be rendered as a 50px ✕ 50px AkarIcons air icon.

Attributes

AttributeTypeCss VarDefault
namestring(Required)
sizenumber--size24
colorstringcolor"inherit"
strokenumber--stroke1
capenum--cap"round"
joinenum--join"round"

Valid values for cap and join can be found here and here.

Try the following examples:

<akar-icon name="bicycle" size="50" cap="butt" join="miter"/> </akar-icon>
<akar-icon name="air" stroke="2" style="transform: scaleX(-1)"/> </akar-icon>

Or set a universal style for all <akar-icon>s:

<style>
  akar-icon {
    --cap: butt;
  }
</style>

And yes, it's that simple! 😇

Features (may be) Coming

Change Log

Dev Preparations

git clone git@github.com:awmleer/akar-icons-web-components.git
yarn run start

Authors

License

MIT License, Copyright © 2021-present @awmleer and @John-Theo.