https://github.com/green-coder/vrac-phosphor-icons
Phosphor icons in Vrac
https://github.com/green-coder/vrac-phosphor-icons
clojurescript vrac
Last synced: about 1 month ago
JSON representation
Phosphor icons in Vrac
- Host: GitHub
- URL: https://github.com/green-coder/vrac-phosphor-icons
- Owner: green-coder
- License: mit
- Created: 2025-10-05T13:59:49.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-10-05T16:53:12.000Z (10 months ago)
- Last Synced: 2026-01-04T01:16:06.865Z (7 months ago)
- Topics: clojurescript, vrac
- Language: Clojure
- Homepage: https://vincent.404.taipei/vrac-phosphor-icons/
- Size: 3.03 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Phosphor icons as Vrac components
[](https://clojars.org/taipei.404.vrac/phosphor-icons)
[](https://clojurians.slack.com/app_redirect?channel=vrac)
## Usage
```clojure
(require '[vrac.web :refer [$]])
(require '[phosphor.icon :as pi])
($ pi/heart {:style {:color "red"}})
($ pi/heart-duotone {:style {:color "red"}})
($ pi/heart-fill {:width "2em"
:height "2em"})
```
See [example-app/](example-app/) for more usage demo.
## API Design
All the icons were placed in the same namespace, in order to help the user
quickly find the icons s/he needs directly from the autocompletion.
The SVG icons are also provided as raw strings, to help the users when facing
any uncommon use case that may arise.
The icon component adds the `icon` class to the SVG element and sets the `width` and `height` properties by default.
If you don't like those defaults, it's easy to use your own implementation after taking a look at the source code.
## Bundle size
Tree shaking works well when compiling with Shadow-CLJS, which means that only the SVG icons you use will land in your released webapp.
If you want to test by yourself, try commenting the section about icon collections in the [example-app/](example-app/) and build a release.
The compiled JS code will be around 32k gzipped, including Clojurescript, Vrac, Signaali and the Phosphor icons used.
## License
This library is a derived work of [`phosphor-icons/core`](https://github.com/phosphor-icons/core)
because it is using its icons, so it is also distributed under the same MIT license.