View Source Heroicons
This package adds a convenient way of using Heroicons with your Phoenix, Phoenix LiveView and Surface applications.
Heroicons is "A set of 450+ free MIT-licensed high-quality SVG icons for you to use in your web projects." Created by the amazing folks at Tailwind Labs.
You can find the original docs here and repo here.
Current Heroicons version: 2.0.11
installation
Installation
Add ex_heroicons
to the list of dependencies in mix.exs
:
def deps do
[
{:ex_heroicons, "~> 2.0.0"}
]
end
Then run mix deps.get
.
usage
Usage
With Eex or Leex
<%= Heroicons.icon("academic-cap", type: "outline", class: "h-4 w-4") %>
With Heex
<Heroicons.LiveView.icon name="academic-cap" type="outline" class="h-4 w-4" />
With Surface
<Heroicons.Surface.Icon name="academic-cap" type="outline" class="h-4 w-4" />
config
Config
Defaults can be set in the Heroicons
application configuration.
config :ex_heroicons, type: "outline"
license
License
MIT. See LICENSE for more details.