material-design-icons-pack 7.4.47

A redistribution of @mdi/svg npm package's SVG and metadata.
Documentation
  • Coverage
  • 99.99%
    7454 out of 7455 items documented1 out of 2 items with examples
  • Size
  • Source code size: 5.98 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 232.97 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 10s Average build duration of successful builds.
  • all releases: 1m 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • 2bndy5/redist-icons
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 2bndy5

material-design-icons-pack

A redistribution of SVG assets and some metadata from the @mdi/svg npm package.

Optimized SVG data

The SVG data is embedded as strings after it is optimized with SVGO. This package is intended to easily inject SVG data into HTML documents. Thus, we have stripped any width and height fields from the <svg> element, while retaining any viewBox field in the <svg> element.

Usage

All icons are instantiated as constants using the Icon data structure. There is a convenient get_icon() function to fetch an icon using it's slug name.

In Python

from material_design_icons_pack import get_icon, ALERT

fetched = get_icon("alert")
assert fetched is not None
assert ALERT.svg == fetched.svg

In Rust

use material_design_icons_pack::{get_icon, ALERT};

assert_eq!(ALERT.svg, get_icon("alert").unwrap().svg);

Rust Features

This crate has the following features:

  • deprecated-icons: Include all icons marked as deprecated. Enabled by default.

The python binding does not support conditionally compiling certain icon families. Note, in the python binding, a deprecation warning is emitted from get_icon() when fetching a deprecated icon.