Skip to content

efahnjoe/dxc-icons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

'Document' is a keyword in Dioxus, please use 'IconDocument'.

For a better experience, it can be used in conjunction with dxc - our UI component library.

API

Name Type Description Default
size Option<&'static str> Icon size "1rem"
color Option<&'static str> Svg fill color "currentColor"

Basic Usage Examples

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

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

Custom Style Example

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

Running the Examples

Make sure you have dioxus installed globally.

dx serve --example icons --platform web -- --no-default-features

About

Dioxus component library with over 290 exquisite icons

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages