Skip to main content

Icon

Usage

variant

When choosing a variant, make sure to load the target font. You can load all three or just one.

sharp

<head>
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
rel="stylesheet"
/>
</head>

rounded

<head>
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
rel="stylesheet"
/>
</head>

Variant Example


import Icon from '@mavvy/m3-ui/Icon';

...

<Icon>emoji_food_beverage</Icon>
<Icon variant="rounded">emoji_food_beverage</Icon>
<Icon variant="sharp">emoji_food_beverage</Icon>

outlined

emoji_food_beverage

rounded

emoji_food_beverage

sharp

emoji_food_beverage

size

Size varies on size and fontVariant props

<Icon size="large" fontVariant="body">light_mode</Icon>
<Icon size="large" fontVariant="title">light_mode</Icon>
<Icon size="large" fontVariant="display">light_mode</Icon>
light_mode
light_mode
light_mode

color

<Icon color="primary">home</Icon>
<Icon color="error">home</Icon>
home
home

filled

<Icon size="medium" fontVariant="display" color="primary" filled>home</Icon>
<Icon size="medium" fontVariant="display" color="error" filled>home</Icon>
home
home

Props

proptypedescription
childrenstringicon name of the google material icon
variantoutlined|rounded|sharpvariant of the icon
colorColoricon color
sizeSizesize of the icon component
filledbooleanif true, will be displayed as a filled icon
fontVariantTextVariantvariant to apply