#material-design #icons #design #material #mdi #constant

material-design-icons

Material Design Icons in the form of string constants

2 stable releases

Uses old Rust 2015

new 7.4.48 May 8, 2025

#2 in #material-design

MIT/Apache

3MB
7.5K SLoC

Material Design Icons for Rust

This crate provides Material Design Icons as string constants, making it easy to integrate these icons into your Rust projects.

The crate is automatically published to crates.io using a GitHub Action every time there's a new version of @mdi/js npm package. Ensuring that you have access to the latest icons from mdi.

Versions of this crate are automatically synced with the versions of @mdi/js npm package.

Features

  • Access Material Design Icons as string constants.
  • Lightweight and dependency-free.
  • Compatible with any Rust version.

Installation

cargo add material-design-icons

Usage

To use the icons in your project, simply import the crate and access the constants: The constants refer to the attribute for SVG icons.

/// Example for a Leptos/Sycamore DOM like framework, adjust it according to your needs.
use material_design_icons as mdi;

#[component]
fn App() -> View {
  view! {
    <svg viewBox="0 0 24 24">
      <path d=mdi::CHECK />
    </svg>
  }
}

Repository

The source code for this crate is available on GitHub.

License

This project is dual-licensed under either:

No runtime deps