This plugin is used to integrate heroicons with the project using the Phoenix Framework and Tailwind CSS.
- Declare heroicons dependency in mix.exs:
defp deps do
[
...
{:heroicons,
github: "tailwindlabs/heroicons",
tag: "v2.1.1",
sparse: "optimized",
app: false,
compile: false,
depth: 1}
...
]
end
- Add the package into
assets/package.json
:
pnpm --prefix assets add phoenix-heroicons
- Declare the plugin in the
assets/app.css
:
@import "tailwindcss" source(none);
@source "../css";
@source "../js";
@source "../../lib/your_app_web";
@plugin "phoenix-heroicons";
- Run the tailwind command:
mix tailwind your_app
MIT © Gilbert Wong. See LICENSE.md for details.