Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

312
Views
How to insert SVG file using React , having it's path/url?

I have an array of objects as shown below, I want to display coresponding svg file of each object.icon, the first object is using ion-icons element and it works but how do I render svg file having only it's path/url? I want to avoid importing the svg files because there will be like 70 of them :)

  [{
    id: 1,
    name: 'HTML',
    icon: <ion-icon class='skill-icon' name='logo-html5' />,
  },
  {
    id: 2,
    name: 'CSS',
    icon: './img.svg' />,
  },]

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

import svgName from './img.svg'

  [{
    id: 1,
    name: 'HTML',
    icon: <ion-icon class='skill-icon' name='logo-html5' />,
  },
  {
    id: 2,
    name: 'CSS',
    icon: svgName,
  },]
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!