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

Support Qwik components (and possibly other frameworks) #976

Open
danielbayley opened this issue Sep 29, 2024 · 0 comments
Open

Support Qwik components (and possibly other frameworks) #976

danielbayley opened this issue Sep 29, 2024 · 0 comments

Comments

@danielbayley
Copy link

danielbayley commented Sep 29, 2024

🚀 Feature Proposal

Add an option/argument to the CLI, something like --format <framework>—or possibly --output?

Motivation

Many newer frameworks are better than React, the benefits of SVGR could/should be made available to all.

Example

Given the example from the README, and e.g:

npx @svgr/cli --format qwik --icon --replace-attr-values "#063855=currentColor" -- icon.svg

would produce an optimized Qwik component:

import { component$ } from "@builder.io/qwik"

const SvgComponent = component$(props => (
  <svg width="1em" height="1em" viewBox="0 0 48 1" {...props}>
    <path d="M0 0h48v1H0z" fill="currentColor" fillRule="evenodd" />
  </svg>
)

export default SvgComponent

Pitch

Requests have already come in for multiple frameworks:

etc…

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