MCPcopy Index your code
hub / github.com/SorenHolstHansen/phosphor-leptos

github.com/SorenHolstHansen/phosphor-leptos @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
11 symbols 18 edges 1,516 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

phosphor-leptos

crates.io docs.rs

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

Installation

phosphor-leptos = "0.8.0"

or

cargo add phosphor-leptos

Usage

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 />
    }
}

Props

All of the props are Signals so they can be static or reactive.

  • color?: string – Icon stroke/fill color. Can be any CSS color string, including hex, rgb, rgba, hsl, hsla, named colors, or the special currentColor variable.
  • size?: number | string – Icon height & width. As with standard React elements, this can be a number, or a string with units in px, %, em, rem, pt, cm, mm, in.
  • weight?: IconWeight – Icon weight/style. Can also be used, for example, to "toggle" an icon's state: a rating component could use Stars with IconWeight::Regular to denote an empty star, and IconWeight::Fill to denote a filled star.
  • mirrored?: boolean – Flip the icon horizontally. Can be useful in RTL languages where normal icon orientation is not appropriate.

License

MIT © Phosphor Icons

Knowledge

Contributing

To generate all the icons, run

cargo xtask update

Core symbols most depended-on inside this repo

get
called by 4
src/lib.rs
run
called by 1
xtask/src/main.rs
extract_categories
called by 1
xtask/src/update.rs
cargo_template
called by 1
xtask/src/update.rs
icon_template
called by 1
xtask/src/update.rs
run
called by 1
xtask/src/update.rs
main
called by 0
xtask/src/main.rs
Icon
called by 0
src/lib.rs

Shape

Function 6
Enum 2
Method 2
Class 1

Languages

Rust100%

Modules by API surface

xtask/src/update.rs4 symbols
src/lib.rs4 symbols
xtask/src/main.rs3 symbols

For agents

$ claude mcp add phosphor-leptos \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page