Rust
cargo add magic-glyphsThe crate has no dependencies (it is no_std with alloc) and includes the 120 free icons. Each icon has its layers, its sound’s name, and its spring motion pre-computed as one 2D matrix per layer per frame.
use magic_glyphs::{icons, Style};
let bell = icons::BELL; // or icons::by_name("bell")let style = Style::duotone().color("#2747f5").size(32);
let svg = bell.svg(&style); // the resting iconlet frame = bell.svg_at(0.12, &style); // 120 ms into its motionlet done = bell.done(0.12); // redraw each frame until truelet m = bell.matrix(0, 0.12); // or draw it yourself: [a b c d e f] for layer 0Draw the SVG with what your toolkit uses: resvg + tiny-skia for a pixmap, an SVG image loader in egui, svg::Handle in iced, or Slint’s image support. Start the motion on hover or click, and draw svg_at(elapsed) each frame until done.
Paid icons
Section titled “Paid icons”Log in with your licence key, then generate the icons you use into your project. Each file holds one pub const ICON: Icon:
npx magic-glyphs login YOUR-LICENCE-KEYnpx magic-glyphs add rocket heart --format rust --out src/glyphsmod glyphs { pub mod rocket; pub mod heart; }let svg = glyphs::rocket::ICON.svg(&Style::solid());icon.sound names the icon’s sound. Export it with npx magic-glyphs add bell --format wav and play it with rodio (or your audio library) when the motion starts.
Tauri, Dioxus, Leptos, Yew
Section titled “Tauri, Dioxus, Leptos, Yew”These draw in a web view, so use the <magic-glyph> web component, which plays the sound for you. See Tauri and Rust.