• Stars
    star
    311
  • Rank 134,521 (Top 3 %)
  • Language
    CSS
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Latest icon fonts and CSS for self-hosting material design icons.

material-icons Downloads

Latest icon fonts and CSS for self-hosting material design icons.

This package is automatically updated, so it will always have the latest icons from Google.

For Material Symbols, see material-symbols

For SVGs, see @material-design-icons/svg

Installation

Install the latest version using:

npm install material-icons@latest

Note: If you are upgrading from 0.x to 1.x see the 1.0.0 release notes.

Usage

Import in JS (example: src/index.js in Create React App, src/main.js in Vue CLI):

import 'material-icons/iconfont/material-icons.css';

or import in CSS (example: src/styles.css in Angular CLI):

@import 'material-icons/iconfont/material-icons.css';

or import in HTML:

<link href="/path/to/material-icons/iconfont/material-icons.css" rel="stylesheet">

To display an icon, use one of the following:

<span class="material-icons">pie_chart</span>          <!-- Filled -->
<span class="material-icons-outlined">pie_chart</span> <!-- Outlined -->
<span class="material-icons-round">pie_chart</span>    <!-- Round -->
<span class="material-icons-sharp">pie_chart</span>    <!-- Sharp -->
<span class="material-icons-two-tone">pie_chart</span> <!-- Two Tone -->

Reducing Build Size

The default material-icons.css includes CSS for all fonts. This may cause build tools such as webpack to copy all fonts to the build directory even if you are not using all of them. To reduce the build size, import only the styles you need. For example, if you only need filled and outlined icons, import filled.css and outlined.css instead of the default material-icons.css:

-import 'material-icons/iconfont/material-icons.css';
+import 'material-icons/iconfont/filled.css';
+import 'material-icons/iconfont/outlined.css';
Show all
Icons CSS Sass
Filled filled.css filled.scss
Outlined outlined.css outlined.scss
Round round.css round.scss
Sharp sharp.css sharp.scss
Two Tone two-tone.css two-tone.scss

Using Sass

Import in Sass (example: src/styles.scss in Angular CLI):

@import 'material-icons/iconfont/material-icons.scss';

Available Sass variables:

$material-icons-font-path: './' !default;
$material-icons-font-size: 24px !default;
$material-icons-font-display: block !default;

If you are getting errors with webpack or Vue CLI, add this line before importing:

$material-icons-font-path: '~material-icons/iconfont/';

Using Angular mat-icon

To display an icon, use one of the following:

<mat-icon>pie_chart</mat-icon>
<mat-icon fontSet="material-icons-outlined">pie_chart</mat-icon>
<mat-icon fontSet="material-icons-round">pie_chart</mat-icon>
<mat-icon fontSet="material-icons-sharp">pie_chart</mat-icon>
<mat-icon fontSet="material-icons-two-tone">pie_chart</mat-icon>

Using CSS Classes

Alternatively, you may use CSS classes instead of ligatures to display icons. Learn more

Available Icons

See demo.

License

Material design icons are created by Google.

We have made these icons available for you to incorporate into your products under the Apache License Version 2.0. Feel free to remix and re-share these icons and documentation in your products. We'd love attribution in your app's about screen, but it's not required.

More Repositories

1

ctransformers

Python bindings for the Transformer models implemented in C/C++ using GGML library.
C
1,780
star
2

chatdocs

Chat with your documents offline using AI.
Python
683
star
3

material-symbols

Latest variable icon fonts and optimized SVGs for Material Symbols.
CSS
163
star
4

material-design-icons

Latest icon fonts and optimized SVGs for material design icons.
JavaScript
158
star
5

gpt4all-j

Python bindings for the C++ port of GPT4All-J model.
Python
38
star
6

jekyll-theme-documentation

A Jekyll theme for hosting documentation on GitHub Pages.
HTML
17
star
7

gptj.cpp

Port of GPT-J model in C/C++
C++
11
star
8

new-url-loader

A tiny alternative to url-loader and file-loader for webpack 5.
JavaScript
8
star
9

node-grpc-web

gRPC Web proxy and Express / Connect middleware for Node.js
JavaScript
7
star
10

svgv

Transform SVGs into Vue components.
JavaScript
3
star
11

evaluate

A tool to evaluate the performance of various machine learning algorithms and preprocessing steps to find a good baseline for a given task.
Python
2
star
12

exllama

Python
2
star
13

phd

PHP Database library.
PHP
2
star
14

redux-reflex

Reduce boilerplate code by automatically creating action creators and action types from reducers.
JavaScript
2
star
15

jekyll-theme-github

A Jekyll theme for GitHub Pages based on GitHub's Primer styles.
SCSS
2
star
16

nbimport

An IPython magic command to import and run external notebooks using public URLs.
Python
2
star
17

nn

A neural network library built on top of TensorFlow for quickly building deep learning models.
Python
2
star
18

phython

Call Python modules and functions from PHP.
PHP
2
star
19

webpack-setup

[DEPRECATED] Webpack config simplified.
JavaScript
1
star
20

react-redux-async

Load react components and redux reducers asynchronously. Useful for code splitting and lazy loading.
JavaScript
1
star
21

godb

A simple key-value store server written in Go language.
Go
1
star
22

code-guidelines

1
star
23

pwk

Sample scripts and manifests for playing with Kubernetes.
Shell
1
star
24

train

A library to build and train reinforcement learning agents in OpenAI Gym environments.
Python
1
star
25

guides

General contributing guidelines and coding standards.
1
star
26

external

Run tasks on external processes to overcome Python's global interpreter lock.
Python
1
star
27

shr

Simple HTTP requests for browser. "Simple requests" don't trigger a CORS preflight.
JavaScript
1
star
28

test-lumen

Test monolith and microservices implementation in lumen.
PHP
1
star
29

modernize

normalize.css with useful defaults for modern browsers.
CSS
1
star