NaN

NaN

phx is 1.7

Neither of these are working… what am I missing???

<button id="expandButton" class="hero-document-arrow-down"><.icon name="hero-document-arrow-down" /></button>

Other icons work are are available in app.css. But none that I add… I dont get it

Showing Posts 1 to 10

mindok

mindok

It’s a bit hard to identify the problem from what you’ve given. If you are pulling in Heroicons via a mix dependency (e.g. {:heroicons, "~> 0.5"}, in your mix.exs) then you would access them via the function components defined in the Heroicons library, e.g.

<button ...> 
  <Heroicons.arrow_right_on_rectangle class="w-6 h-6" />
</button>

Edit: if you are using the default contents of core_components.ex, read the generated docs for the icon function - it explains how the icons are extracted.

NaN

NaN OP

Im not pulling it. icon is defined in core_components… some, and Im not sure why, of the icons are working…

mindok

mindok

Mid air collision - have you read the docs in core_components related to icons?

NaN

NaN OP

I didnt find much. Link?

Im running core components basically out of the box, w/o modification.

Hermanverschooten

Hermanverschooten

<.icon name=“hero-document-arrow-down” class=“w-4 h-4” />
Put this inside your button.

w0rd-driven

w0rd-driven

This depends on the version of 1.7. Heroicons started as a mix dependency up until 1.7.2 I believe, then it changed to being frontend assets. The dependency version is compiled in and includes every icon, bloating your app a little. You get more flexibility with changing colors and other svg internals though.

Hermanverschooten

Hermanverschooten

I forgot to mention that if you don’t specify the dimensions you will not see the icon.

sodapopcan

sodapopcan

I see you’ve solved your problem, though it looks like you might be using the Heroicons package? If you want to use the <.icon /> way, you could try running this inside assets/vendor/heroicons/:

export HERO_VSN="2.1.1" ; \
  curl -L "https://github.com/tailwindlabs/heroicons/archive/refs/tags/v${HERO_VSN}.tar.gz" | \
  tar -xvz --strip-components=1 heroicons-${HERO_VSN}/optimized
mindok

mindok

It’s in the core_components.ex file in your project. Search for def icon and you’ll find it.

NaN

NaN OP

Im not using the heroicon lib… I must have accidentally clicked the solution button

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews