Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SorenHolstHansen/phosphor-leptos
Phosphor icons for leptos
https://github.com/SorenHolstHansen/phosphor-leptos
Last synced: 2 months ago
JSON representation
Phosphor icons for leptos
- Host: GitHub
- URL: https://github.com/SorenHolstHansen/phosphor-leptos
- Owner: SorenHolstHansen
- License: mit
- Created: 2023-10-19T20:18:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-16T18:10:42.000Z (7 months ago)
- Last Synced: 2024-07-18T03:12:26.457Z (6 months ago)
- Language: Rust
- Size: 5.26 MB
- Stars: 27
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-leptos - phosphor-leptos
README
# phosphor-leptos
[![crates.io](https://img.shields.io/crates/v/phosphor-leptos)](https://crates.io/crates/phosphor-leptos)
[![docs.rs](https://docs.rs/phosphor-leptos/badge.svg)](https://docs.rs/phosphor-leptos)Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really. You can explore the available icons at [phosphoricons.com](https://phosphoricons.com).
## Installation
```bash
phosphor-leptos = "0.6.0"
```or
```bash
cargo add phosphor-leptos
```## Usage
```rs
use leptos::*;
use phosphor_leptos::{Icon, IconWeight, HORSE, HEART, CUBE};#[component]
fn MyComponent() -> impl IntoView {
view! {
}
}
```### Props
All of the props are `MaybeSignal`s 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](https://github.com/phosphor-icons)
## Knowledge
- [Phosphor Svelte](https://github.com/haruaki07/phosphor-svelte)
## Contributing
To generate all the icons, run
```bash
cargo xtask update
```