Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

How to list all available custom icons

Open
#222 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start with the import.meta.glob custom-SVG example in the issue and inspect the repository's current custom-icon documentation or API entry points; no specific file or test is named. Determine whether the supported way to enumerate available custom icons is documented, then make the expected listing behavior and example explicit.

Written by the indexing model from the issue text.

Description

Usually I fetched the different icons with something like.

var icons = import.meta.glob(`.././assets/*.svg`, { as: "raw", eager: true })

for (const item in icons) {
  body.innerHTML = icons[item]
  let name = item.formatx(`../assets/$V.svg`)
  let color = body.querySelector("#color")?.getAttributeNS(null, "fill") || "black"
  let size = undefined // TODO

  result.push(await icon(`${name} c-${color}`, body.querySelector("svg") || undefined))
}

But this returns
image

Is there a better way?

Dominant language
TypeScript
Stars
1.2k
Forks
97
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nuxt/icon

All issues in nuxt/icon

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.