Crate phosphor_leptos

Source
Expand description

Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really. You can explore the available icons at phosphoricons.com.

use leptos::prelude::*;
use phosphor_leptos::{Icon, IconWeight, HORSE, HEART, CUBE};

#[component]
fn MyComponent() -> impl IntoView {
    view! {
        <Icon icon=HORSE />
        <Icon icon=HEART color="#AE2983" weight=IconWeight::Fill size="32px" />
        <Icon icon=CUBE color="teal" weight=IconWeight::Duotone />
    }
}

Structs§

IconProps
Props for the Icon component.
IconWeightData
The SVG path data for all weights of a particular icon.

Enums§

IconWeight
An icon’s weight or style.

Functions§

Icon
A thin wrapper around <svg /> for displaying Phosphor icons.

Type Aliases§

IconData
A convenient alias for passing around references to IconWeightData.