Usage Guide
Learn how to install and use Material Symbols SVG in your project.
Installation
Install the package using your preferred package manager:
NPM package links:
Basic Usage
Import icons by weight and style:
Preview:
Icon Styles
Material Symbols come in three styles:
Preview:
Icon Weights
Icons are available in 7 different weights (100-700):
Preview:
Icon Size
Control icon size using the size prop:
Preview:
Icon Color
Using color prop
Preview:
Using CSS custom properties
Import Strategy
Root imports are ergonomic, but deep imports can be safer for some frameworks and faster in development.
Astro 5: prefer deep import
The 2026-04-03 report in material-symbols-svg-test shows Astro 5 root import timing out at 90 seconds in dev startup, while deep import succeeded in 1.75 seconds. Treat deep import as the practical default for Astro 5.
React
Root import is fine for most apps. Switch to deep import when you want stricter control over bundle boundaries.
Root import
Deep import
Vue
Root import works well in Vue 3 and Nuxt 3. Deep import is useful when you want variant-level imports.
Root import
Deep import
Svelte
Svelte supports both patterns cleanly. Root import is concise, deep import is better when you want exact variant ownership.
Root import
Deep import
Astro
Astro 5 should prefer deep import for development ergonomics. Astro 6 can use either, but deep import remains the safer recommendation.
Root import
Deep import
React Native
Root import is the normal default in React Native. Deep import is mainly useful when you want explicit per-icon variant imports.
Root import
Deep import
Next.js Configuration
⚠️ Important for Next.js Users
Without proper configuration, Next.js development mode will load all icons, consuming significant memory and slowing down your development experience.
Add the following configuration to your next.config.js or next.config.ts. Include only the specific style/weight combinations you use in your project:
React Native / Expo
React Native uses the same icon names and style structure, but runs on react-native-svg instead of the browser SVG runtime.
What to prepare
- Install react-native-svg alongside @material-symbols-svg/react-native.
- Expo projects can usually verify bundle resolution with expo export before opening simulators.
- Check iOS and Android rendering separately when you change package generation or SVG behavior.
- Use root import for the common path and deep import only when you need exact icon-level control.
Accessibility
Keep decorative icons hidden from assistive technology, and add explicit labels when the icon conveys meaning or triggers an action.
- for decorative icons
- for meaningful icons
- for interactive icons