Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mshornikov opened this issue Mar 5, 2025 · 0 comments
Open

Comments

@mshornikov
Copy link

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.

@mshornikov mshornikov changed the title Is there a way to change svg element viewBox attribute? Is there a way to change svg element viewBox attribute? Mar 5, 2025
@mshornikov mshornikov changed the title Is there a way to change svg element viewBox attribute? Is there a way to change the viewBox attribute of an SVG element? Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant