ream88

ream88

Hey,

I saw @woylie’s ExIcon post a few days ago and it finally pushed me to build something I’ve been wanting for a while. Full disclosure: I shamelessly stole the idea :grinning_face_with_smiling_eyes: — if it makes sense to join forces at some point, I’d be totally up for that!

At Tagbase we have an umbrella app with multiple web apps, and we use different icon sets for different things: Heroicons for UI, Lineicons for brand logos, Flagpack for country flags. We had custom Mix tasks to download and process them, separate Tailwind plugins to render them as CSS masks, and multiple Git dependencies to keep in sync. It worked, but it was getting cumbersome.

PhxIcons takes a different approach: it scans your templates at compile time, downloads only the icons you actually use, and inlines the SVGs as compiled function clauses. Zero runtime overhead, no unused icons bundled, no custom build steps. If an icon doesn’t exist in your templates, it’s never downloaded.

The library is completely vibe-coded, so bear with me if things are rough around the edges.

# In your component module
defmodule MyAppWeb.CoreComponents do
  use Phoenix.Component
  use PhxIcons
end

# In templates
<.icon name="heroicons:heart" class="size-6 text-red-500" />
<.icon name="lucide:search" class="size-4" />
<.icon name="flagpack:at" class="size-8" />

Currently supported providers: Heroicons, Lucide, Tabler, Phosphor, Simple Icons, Flagpack, and Lineicons. Adding new ones is straightforward via a behaviour.

A nice side effect: our CI got noticeably faster after the switch, probably because we no longer need Node.js for icon processing, and Node on GitHub runners is not exactly speedy.

Check out the demo to see all providers in action.

v0.1.0 is on Hex

https://github.com/ream88/phx_icons

Would love feedback — try it out and let me know what you think!

EDIT: Another notable inspiration: phoenix_iconify | Hex

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews