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

231
Views
How to add multiple icon to an array

I have an array simply like this

const data = {
products: [
{
   name: 'example1',   
   icon: <exampleIcon />,
},
{
   name: 'example2'
   icon: <exampleIcon2 />
},
],
};

I'm using icons from React Icons

Is it possible for me to add multiple icons to the icon part? like three icons in a row like this exampleIcon exampleIcon exampleIcon

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

0

Yes you can, just wrap your components into a root div like this:

const data = {
  products: [
    {
      name: 'example1',
       icon: <div className="wrapper"><exampleIcon /><exampleIcon /><exampleIcon /></div> ,
    },
    {
      name: 'example2',
       icon: <exampleIcon2 />
    },
  ],
};

Add this style:

.wrapper {
  display: flex;
}
about 4 years ago · Juan Pablo Isaza Report

0

you should be able to put multiple icons inside a react fragment

icon: <><exampleIcon /> <exampleIcon2 /></>,
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!