Boxicons is a well-designed open-source icon set of 1500+ icons to enrich your website/app experience.
Install
To install via npm, simply do:
$ npm install boxicons --save
import module
usage
Use via CSS
- Include the style sheet in the document’s
<head>
<head>
<link rel="stylesheet" href="https://www.oschina.net/p/boxicons.min.css">
</head>
A remote version can be used
<head>
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/boxicons@latest/css/boxicons.min.css">
<!-- or -->
<link rel="stylesheet"
href="https://unpkg.com/boxicons@latest/css/boxicons.min.css">
</head>
- To use an icon on a page, add the class “bx” and a separate class, prefixing the icon name with “bx-” for regular icons, “bxs-” for solid icons, and “bxl-” for logos:
<i class="bx bx-hot"></i>
<i class="bx bxs-hot"></i>
<i class="bx bxl-facebook-square"></i>
Use via Web Components
Boxicons includes a custom element that makes working with icons easy and efficient.To use it, set thebox-icon-element.js
File added to page:
<script src="https://unpkg.com/boxicons@2.1.3/dist/boxicons.js"></script>
To use icons, set the<box-icon>
element added where the icon should be displayed:
<box-icon name="hot"></box-icon>
To use an entity icon or logo, precede the name with the entity or logoattribute type
<box-icon type="solid" name="hot"></box-icon>
<box-icon type="logo" name="facebook-square"></box-icon>
<box-icon>
Custom elements support the following attributes:
<box-icon
type = "regular|solid|logo"
name="adjust|alarms|etc...."
color="blue|red|etc..."
size="xs|sm|md|lg|cssSize"
rotate="90|180|270"
flip="horizontal|vertical"
border="square|circle"
animation="spin|tada|etc..."
pull = "left|right"
></box-icon>
#Boxicons #Homepage #Documentation #Downloads #Open #Source #Web #Icon #Library #News Fast Delivery