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

196
Views
Can't show icon with fontawesome's react-js library
import "./App.css";
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'

function App() {
return (
<div className="container">
  <input type="text" className="form-control" placeholder="Ara..." id="search_input"> 
</input>
  <button type="button" className="btn btn-light" id="search_button"><FontAwesomeIcon 
icon="search" /></button>

  <button type="button" className="btn btn-primary" id="buttons">E-Twinning</button>
  <button type="button" className="btn btn-primary" id="buttons">Erasmus</button>
</div>
 );
 }

export default App;

I need to help about this. I have a png and svg file in background I tried show to svg and png files but it didn't work. I tried both method like as above and both working wrong.

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

0

To use string in the icon prop ( the way you are using), you need to add those icons using library.add() to make it work.

Read more here. Check section "Using Icons via Global Use"

One other way is to import individual icons and use them.

import { faSearch } from "@fortawesome/free-solid-svg-icons";

<FontAwesomeIcon icon={faSearch} />

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!