Giter Club home page Giter Club logo

ionicons's Introduction

Ionicons

Usage

Ionicons is a completely open-source icon set with 1,300 icons crafted for web, iOS, Android, and desktop apps. Ionicons was originally made for the Ionic Framework, a cross-platform hybrid and Progressive Web App framework.

Using the Web Component

The Ionicons Web Component is an easy and performant way to use Ionicons in your app. The component will dynamically load an SVG for each icon, so your app is only requesting the icons that you need.

<ion-icon name="logo-facebook"></ion-icon>

Also note that only visible icons are loaded, and icons which are "below the fold" and hidden from the user's view do not make fetch requests for the svg resource.

Installation

Download this repo and place it in your project or use a cdn.

Load Ionicons locally

Download this repo and place the following <script> near the end of your page, right before the closing </body> tag, to enable the font. If you have placed the ionicons folder in the project's root folder, use the following relative paths:

<script src="/ionicons/ionicons.esm.js" type="module"></script>
<script src="/ionicons/ionicons.js"></script>

For more information on how to load the icons locally, check the following article: 2 Ways to Load Ionicons in WordPress (Locally and with CDN)

Load Ionicons via CDN

Use the following <script> to load the icons via CDN:

<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>

For more information on how to load the icons with a CDN, check Ionicons official documentation.

Cross-browser Support

The 5-th version of the icons works great on all modern browsers (Chrome, Firefox, Safary, Opera, etc.) and has partial support for Internet Explorer. With a few small css tweaks it can be made to work flowlessly with Internet Explorer 11. If you need to support this aging browser, you should add the following css to display icons in outline version:

/* IE 11 Ionicons fix */
.ionicon-stroke-width {
  stroke-width: 32px;
  stroke: #333;
}

.ionicon-fill-none {
  fill: none;
}

License

(C) 2013-2021 Ben Sperry, MIT

ionicons's People

Contributors

yonkov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

s-nakano-codmon

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.