Introduction

Rust Heroicons is a Rust port of Heroicons.

Heroicons is a set of free MIT-licensed high-quality SVG icons for UI development.

Frameworks

Rust Heroicons is available for the following frameworks:

License

This project is available under the MIT license.

Rust For Web

The Rust Heroicons project is part of Rust For Web.

Rust For Web creates and ports web UI libraries for Rust. All projects are free and open source.

Frameworks

Heroicons Dioxus

Implementation of the Heroicons icon library for Dioxus applications.

Installation

cargo add heroicons-dioxus

Usage

use dioxus::prelude::*;
use heroicons_dioxus::Camera;

#[component]
fn App() -> Element {
    rsx! {
        Camera {
            color: "red",
            size: 48,
        }
    }
}

Props

NameTypeDefault
sizeusize24
colorString"currentColor"
fillString"none"
stroke_widthusize2
absolute_stroke_widthboolfalse

Icons

Heroicons Leptos

Implementation of the Heroicons icon library for Leptos applications.

Installation

Install the icons from your command line.

cargo add heroicons-leptos

Usage

use leptos::prelude::*;
use heroicons_leptos::Camera;

#[component]
fn App() -> impl IntoView {
    view! {
        <Camera color="red" size=48 />
    }
}

Props

NameTypeDefault
sizeSignal<usize>24
colorSignal<String>"currentColor"
fillSignal<String>"none"
stroke_widthSignal<usize>2
absolute_stroke_widthSignal<bool>false

Icons

Heroicons Yew

Implementation of the Heroicons icon library for Yew applications.

Installation

Install the icons from your command line.

cargo add heroicons-yew

Usage

use heroicons_yew::Camera;
use yew::prelude::*;

#[component]
fn App() -> Html {
    html! {
        <Camera color="red" size=48 />
    }
}

Props

NameTypeDefault
sizeusize24
colorString"currentColor"
fillString"none"
stroke_widthusize2
absolute_stroke_widthboolfalse

Icons