#icons #static #hero #collection #svg #fill #75

bin+lib static_hero_icons

A collection of static hero icons

3 releases (breaking)

new 0.3.0 Dec 17, 2024
0.2.1 Dec 17, 2024
0.1.0 Dec 17, 2024

#432 in Images

Download history 293/week @ 2024-12-14

293 downloads per month

Custom license

180KB
72 lines

Static Heroicons in rust

Example

fn main() {
    let svg = static_hero_icons::sxt("academic-cap");
    println!("{}", svg);
}

will print:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
  <path d="M7.702 1.368a.75.75 0 0 1 .597 0c2.098.91 4.105 1.99 6.004 3.223a.75.75 0 0 1-.194 1.348A34.27 34.27 0 0 0 8.341 8.25a.75.75 0 0 1-.682 0c-.625-.32-1.262-.62-1.909-.901v-.542a36.878 36.878 0 0 1 2.568-1.33.75.75 0 0 0-.636-1.357 38.39 38.39 0 0 0-3.06 1.605.75.75 0 0 0-.372.648v.365c-.773-.294-1.56-.56-2.359-.8a.75.75 0 0 1-.194-1.347 40.901 40.901 0 0 1 6.005-3.223ZM4.25 8.348c-.53-.212-1.067-.411-1.611-.596a40.973 40.973 0 0 0-.418 2.97.75.75 0 0 0 .474.776c.175.068.35.138.524.21a5.544 5.544 0 0 1-.58.681.75.75 0 1 0 1.06 1.06c.35-.349.655-.726.915-1.124a29.282 29.282 0 0 0-1.395-.617A5.483 5.483 0 0 0 4.25 8.5v-.152Z"/>
  <path d="M7.603 13.96c-.96-.6-1.958-1.147-2.989-1.635a6.981 6.981 0 0 0 1.12-3.341c.419.192.834.393 1.244.602a2.25 2.25 0 0 0 2.045 0 32.787 32.787 0 0 1 4.338-1.834c.175.978.315 1.969.419 2.97a.75.75 0 0 1-.474.776 29.385 29.385 0 0 0-4.909 2.461.75.75 0 0 1-.794 0Z"/>
</svg>

All functions


#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn sxt_test() {
        let svg = sxt("academic-cap");
        assert!(svg.contains("svg"));
    }

    #[test]
    fn twn_test() {
        let svg = twn("academic-cap");
        assert!(svg.contains("svg"));
    }

    #[test]
    fn twnf_solid_test() {
        let svg = twnf_solid("academic-cap");
        assert!(svg.contains("svg"));
    }

    #[test]
    fn twnf_out_test() {
        let svg = twnf_out("academic-cap");
        assert!(svg.contains("svg"));
    }
}

Dependencies

~315KB