(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/ for more usage demo.
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/ and build a release. The compiled JS code will be around 32k gzipped, including Clojurescript, Vrac, Signaali and the Phosphor icons used.
This library is a derived work of phosphor-icons/core
because it is using its icons, so it is also distributed under the same MIT license.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |