Questions tagged [react-icons]

Usage

import { FaBeer } from 'react-icons/fa';

class Question extends React.Component {
    render() {
        return <h3> Lets go for a <FaBeer />? </h3>
    }
}

Docs.

146 questions
1
vote
2 answers

How to change fill color for React icons?

I want to change the color of React-icons. Say, for example {AiFillHeart} icon. I want to change its fill color to red. How can I do this? I have tried . But it does not works.
apurbo
  • 11
  • 1
  • 2
1
vote
1 answer

With styled components how to pass theme color from Global Style to React Icons Context Provider?

Looking for a way to pass color from theme to React Icons. Theme is working correctly and I'm able to pass colors to my styled components. Here is the breakdown: index.js: import React from 'react' import ReactDOM from 'react-dom' import App from…
DᴀʀᴛʜVᴀᴅᴇʀ
  • 7,681
  • 17
  • 73
  • 127
1
vote
2 answers

How to change heart ( wishlist icon ) color when clicked in ReactJS?

How can I change the color of my icon when it's clicked and the color remains the same after clicking. It will not change their state. import {RiHeart3Fill} from 'react-icons/ri'; import './Details.scss';
Zain Zahid
  • 33
  • 2
  • 8
1
vote
1 answer

Using Icons in React

I have the icons below as following import GandalfIcon from "../../assets/gandalf.svg"; import TreasureMapIcon from "../../assets/treasuremap.svg"; import BookIcon from "../../assets/book.svg"; import AcademyIcon from "../../assets/academy.svg"; I…
cantoraman
  • 56
  • 3
1
vote
1 answer

Getting Error: Expression expected.ts(1109) React js

I am trying to make a tic tac toe game, but unfortunately, I am getting error under switch statement. 1.import React from 'react'; 2.import {FaTimes, FaPen, FaRegCircle} from 'react-icons/fa'; 3. 4.const Icon = ({name}) =>( 5. ***switch*** (name)…
pranav gautam
  • 13
  • 1
  • 3
1
vote
1 answer

Material Design and Ionicons in select option in React

How can I add icons in select dropdown? My code is: import React, { Component } from 'react'; import Icon from '@mdi/react' import { mdiFormatAlignLeft } from '@mdi/js'; import { mdiCheckboxMarked } from '@mdi/js'; import { IoMdRadioButtonOn } from…
1
vote
1 answer

React react-icons-kit and get Icons dynamically

How to get Icons dynamically in React using extension React Icon kit? I try to find out the way to add a icon dynamically in a MAP-loop as I get them from array "sociallinks" here is the part of the code .... import { Icon } from…
user2544102
  • 91
  • 1
  • 6
0
votes
0 answers

how to remove the outer color of react-icons

I want the close button to remove the outer color and I'm stuck on removing the outer color so somebody please help me get rid of it below is the code .button { …
vermouth
  • 11
  • 1
0
votes
3 answers

Problem using a React icon for onClick navigation

I am trying to use a React icon for onClick navigation to my homepage. Button onClick works for this but when I use the same code for a react icon, I get a blank page. The commented out section is the working button onClick. import { useNavigate }…
transpose
  • 9
  • 2
0
votes
0 answers

Error during deployment of vite+react+tailwind website on netlify

I have created a basic portfolio website using vite+react+tailwind and it worked properly in local but when i tried to deploy it it gives the following error:- [13:56:48.443] Running build in Cleveland, USA (East) – cle1 [13:56:48.509] Cloning…
som
  • 1
  • 1
0
votes
1 answer

Bundle size increas using react icons

I noticed that using react-icons exponentially increases the bundle size. I have seen many questions on Stack Overflow, but none of them provided a satisfactory answer. I have around 10 components that use a total of 20 icons from react-icons, and…
Bennyh961
  • 85
  • 1
  • 7
0
votes
1 answer

Creating a hoverable menu

I want to create a menu that appears on hovering the icons but I am unbale to do so. Despite trying all the ways, i am unable to create a hoverable menu. i want to create a menu just like this- https://www.instagram.com/p/Cu2EyHVNFbJ/?img_index=2…
Onkar Mehra
  • 43
  • 1
  • 10
0
votes
0 answers

I have a syntax error that was not an issue before? This happened a bit after installing react-router-dom

I've posted the code in question below: import React from 'react'; import {FaGithub, FaLinkedin, FaCodepen} from 'react-icons/fa'; import {HiOutlineMailOpen} from 'react-icons/hi'; import {BsFillPersonLinesFill} from 'react-icons/bs'; const…
Birdy
  • 11
  • 1
0
votes
0 answers

Migrating react-icons from 2.2.7 to 4.10.1

I am migrating my code base from react-icons version 2.2.7 to 4.10.1 and I have so many imports like - react-icons/lib/io/android-locate react-icons/lib/io/chevron-right Is there a method to find these icons with the existing ones, or do I have to…
0
votes
0 answers

Adding new Icons to MUI library

Is it possible to add new icons to MUI Library ? Please help us find some workarounds to add icons to the library. I coudld not able to find the appropiate icon for my product, so trying to add some custom MUI icons which is not availbale in MUI…