Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Is there a way to split a large svg with multiple <g> tags into separate files to make react component?

I have a large svg that I am trying to animate in a react app as a component (basically looks like a pitch indicator on an aircraft). The svg I have made on Inkscape has been exported as plain svg and I have used svgr to make it into a component.

The problem is is that there are multiple 'groups' that I want to be able to pass properties to, i.e. transform(x,y). But as the svg is quite large, it's quite unmanageable to work with. The svg has format:

<svg>
<g></g>
<g></g>
:   :
<g></g>
</svg>

Is there any way of turning this into multiple files that I can call into the component file so I can more easily manage the manipulation? i.e.

const component = (some props) => (
<svg> 

<g from another file with props/> e.g. transform
<g from another file with props/> 
etc

</svg> 

)

I am quite new to using this so this may not be the best way of going about doing it (or even possible?). Would anyone have any suggestions of how to go about doing this?

Thanks!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda