Skip to content

multiplyco/heroicons-clojure

Repository files navigation

heroicons-clojure

DEPRECATED: We now recommend that you use the heroicons npm lib instead. Thanks for this time if you've been using and liking this lib ☺️

Converts the full heroicons set for easy use from Clojure and ClojureScript as .cljc files.

Currently we include Hiccup (for Reagent et. al.) and Fulcro definitions.

Coordinates

Clojars Project

to.fluent/heroicons-clojure {:mvn/version "1.0.4"}

Usage

For medium/outline icons, the icon is available at

;; Fulcro
to.fluent.heroicons-clojure.fulcro.outline.{icon-name}/{icon-name}

;; Reagent
to.fluent.heroicons-clojure.reagent.outline.{icon-name}/{icon-name}

For small/solid icons, the icon is available at

;; Fulcro
to.fluent.heroicons-clojure.fulcro.solid.{icon-name}/{icon-name}

;; Reagent
to.fluent.heroicons-clojure.reagent.solid.{icon-name}/{icon-name}

Example with wrapper

Using Tailwind CSS classes.

For Fulcro,

(ns my-file
  (:require [to.fluent.heroicons-clojure.fulcro.outline.academic-cap :refer [academic-cap]]))

(dom/div {:classes ["h-5" "w-5"]}
  academic-cap)

For Reagent,

(ns my-file
  (:require [to.fluent.heroicons-clojure.reagent.outline.academic-cap :refer [academic-cap]]))

[:div {:class ["h-5" "w-5"]}
 academic-cap)

Each namespace also includes an alias of the icon name with the suffix -icon, which can be used to avoid ambiguity.

Building

Clone heroicons into heroicons and run ./build.clj.

Requires babashka.

License

The heroicons set is offered under its original license.

For simplicity, heroicons-clojure uses the same license.

About

Library by Fluent. Icons by Adam Wathan.

About

heroicons for Fulcro and Reagent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published