dxc-icons 0.1.3

Dioxus Icons
Documentation

Dioxus Components Icon

Thanks for Element Plus for providing the icons.

Element Plus Dioxus

Preview

Install

Make sure your Cargo.toml includes the Dioxus dependency:

[dependencies]
dioxus = "0.6"
cargo add dxc-icons

Usage

Note: Since 'Box' is a keyword in Rust, please use 'IconBox'.

API

Name Type Description Default
size Option<String> Icon size "1em"
color Option<String> Svg fill color "currentColor"

Basic usage examples

use dioxus::prelude::*;
use dxc_icons::{Plus, IconBox};

#[component]
fn App() -> Element {
  Div {
    Plus {}
    IconBox {}
  }
}

Custom style example

rsx! {
    Div {
        Plus {
            size: "16px".to_string(), // The size of the icon: size * size
            color: "black".to_string(), // The svg fill color
        }
    }
}