Materialize CSS | Icons

Materialize CSS provides a rich set of material icons of google which can be downloaded from Material Design specs. Icon libraries that are supported by materialize css are Google Material Icons, Font Awesome Icons and Bootstrap Icons. Different icons can be selected from Material Icons.

Library and Usage: To use these icon, the following line is added in the <head> part of the HTML code.

<link href=”https://fonts.googleapis.com/icon?family=Material+Icons” rel=”stylesheet”>

Then to use the icons, name of the icon is provided in the <i> part of HTML element.

<i class="material-icons">add</i>

Material icon sizes:  Materialize CSS provides icons in four sizes: tiny, small, medium, large. The sizes for tiny, small, medium and large are 1 rem, 2 rem, 4 rem and 6 rem respectively.



<i class = "material-icons tiny">add</i>  
<i class = "material-icons small">add</i>  
<i class = "material-icons">add</i>  
<i class = "material-icons medium">add</i>  
<i class = "material-icons large">add</i>

Example: 

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <!--Import Google Icon Font-->
    <link href=
        rel="stylesheet">
  
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href=
  
    <script type="text/javascript" src=
    </script>
  
    <!--Let browser know website is 
        optimized for mobile-->
    <meta name="viewport" content=
    "width=device-width, initial-scale=1.0" />
</head>
  
<body>
  
    <div class="card-panel">
        <h3 class="green-text">Icons</h3>
        <div class="container">
            <div class="row">
                <div class="col">
                    <i class="material-icons 
                        tiny">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons">
                        account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        small">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        medium">account_circle</i>
                </div>
                <div class="col">
                    <i class="material-icons 
                        large">account_circle</i>
                </div>
            </div>
        </div>
    </div>
  
    <!-- Compiled and minified JavaScript -->
    <script src=
    </script>
</body>
  
</html>

chevron_right


Output:

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.