Skip to main content brightness_auto motion_photos_off palette download more_vert
toc

Material Symbols

md-gb-icon axes: optical size, weight, fill and grade.

Each variable font axis of md-gb-icon is a custom property. See Icons for loading the font and the defaults.

HTMLJS
<md-gb-icon>star</md-gb-icon>

The optical size follows --md-icon-size, which supports 20, 24, 40 and 48px.

star star star star
<md-gb-icon style="--md-icon-size: 20px">star</md-gb-icon>
<md-gb-icon>star</md-gb-icon>
<md-gb-icon style="--md-icon-size: 40px">star</md-gb-icon>
<md-gb-icon style="--md-icon-size: 48px">star</md-gb-icon>

--md-icon-wght runs from 100 to 700.

star star star
<md-gb-icon style="--md-icon-wght: 200">star</md-gb-icon>
<md-gb-icon>star</md-gb-icon>
<md-gb-icon style="--md-icon-wght: 700">star</md-gb-icon>

--md-icon-fill is 0 (outlined) or 1 (filled), and the change animates.

favorite favorite
<md-gb-icon>favorite</md-gb-icon>
<md-gb-icon style="--md-icon-fill: 1">favorite</md-gb-icon>

--md-icon-grad adds emphasis when positive. It needs GRAD in the font request.

star star star
<md-gb-icon style="--md-icon-grad: -25">star</md-gb-icon>
<md-gb-icon>star</md-gb-icon>
<md-gb-icon style="--md-icon-grad: 200">star</md-gb-icon>
Install Material Web 3.0

Your browser did not offer to install the docs as an app. Install them from the browser instead:

Close
Send feedback
Bug Documentation Idea

Opens a new GitHub issue for material-components/material-web in a new tab, with this filled in.

Cancel Open issue