Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mh84/seed_heroicons
https://github.com/mh84/seed_heroicons
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mh84/seed_heroicons
- Owner: mh84
- License: mit
- Created: 2021-06-27T12:30:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-27T18:13:29.000Z (over 3 years ago)
- Last Synced: 2024-08-04T01:04:31.269Z (5 months ago)
- Language: Rust
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-seed-rs - seed_heroicons - Library providing [Heroicons](https://heroicons.com/) to include into Seed-based applications. (Libraries)
README
seed_heroicons
==============Provides a simple to use abstraction for [heroicons](https://heroicons.com/) to embed into [seed](https://github.com/seed-rs/seed) projects with the possibility to use additional classes if needed.
The icons are automatically generated from [source](https://github.com/tailwindlabs/heroicons) and all thanks for creating them should be given to [Tailwind Labs](https://github.com/tailwindlabs).
## Example
```rust
use seed_heroicons::*;...
fn view(model: &Model) -> Node {
div![
// icon with default tailwindcss classes as provided on https://heroicons.com/
// outline: h-6 w-6
outline::AcademicCap::default(),
// solid: h-5 w-5
solid::AcademicCap::default(),// icon with default tailwindcss classes and additional provided classes
// uses https://docs.rs/seed/0.8.0/seed/virtual_dom/to_classes/trait.ToClasses.html as argument
outline::AcademicCap::append("text-black"),
solid::AcademicCap::append(["text-black", "m-2"]),// icon without classes
outline::AcademicCap::clean(),
solid::AcademicCap::clean(),// icon with provided classes
// uses https://docs.rs/seed/0.8.0/seed/virtual_dom/to_classes/trait.ToClasses.html as argument
outline::AcademicCap::with("text-black"),
solid::AcademicCap::with(["text-black", "m-2"]),
]
}...
```