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

Is there a way to change the viewBox attribute of an SVG element?

Open
#365 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
nuxt, typescript
Domain
frontend

Research direction

Start by reading the @nuxt/icon documentation and the implementation of the customize function and component. Reproduce the Ant Design collection case and inspect the rendered SVG viewBox. Done means documenting or supporting a clear way to set viewBox="64 64 896 896" for the affected icon.

Written by the indexing model from the issue text.

Description

While using @nuxt/icon with the Ant Design icon collection, I noticed that the icon sizes don’t quite match those on the Ant Design website. The issue is that icons on the Ant Design website have viewBox="64 64 896 896", whereas icons from the collection have viewBox="0 0 1024 1024" in the svg element.

How can I change the viewBox attribute value? I tried using the customize function and setting the viewBox attribute on the <Icon /> component, but it doesn’t work.

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.