score:-1
Use a SVG as a background image:
.angle-after:after {
display: block;
content: '';
background-image: url('../../node_modules/@fortawesome/fontawesome-pro/svgs/light/angle-right.svg');
background-size: 28px 28px;
height: 28px;
width: 28px;
}
score:1
You can simply use font-awesome in css class before or after
try this code:
.class-name:before {
font-family: "Font Awesome 5 Free";
font-weight: 400;
content: "\f1ea";
position:absolute;
color:#ccc;
top:0;
right:0;
font-size:25px;
font-weight:500;
z-index:-1;
opacity:0.5;
}
if not working please make sure are you installed fontawesome library
How install? check here >>
score:2
Nothing to do with React
Bold fonts, won't show up until you put in the right font-weight
Issue Example
.test {
font-size: 5em;
}
.test:after {
position: absolute;
font-family: 'Font Awesome 5 Free';
content: '\f101';
}
<link href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" rel="stylesheet" />
<div class="test"></div>
Fix
Added font-weight: 900;
.test {
font-size: 5em;
}
.test::after {
position: absolute;
font-family: 'Font Awesome 5 Free';
content: '\f101';
font-weight: 900;
}
<link href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" rel="stylesheet" />
<div class="test"></div>
Source: stackoverflow.com
Related Query
- How to get Font Awesome Icon in react app for a pseudo element in css
- How to get dual tones for font awesome in React 5
- How to get sourcemaps working for React Css Modules?
- How to get size of an element in an react app that is totally based on functional components?
- How to find Icon names for Font Awesome to import with React?
- How can I use Font Awesome icons in an Office UI Fabric React icon button component?
- How to eliminate gap between Font Awesome Icon and paragraph in React JS?
- React - how to set inline CSS for each element of map function?
- How to individually change text color and font weight in the same div element using Tailwind CSS and React
- Using font awesome icon for background image in React
- How to: randomize element positions and size within a css "grid" in a React app
- How can I get the current state of element in react for rendering progress bar?
- How to add CSS server side render for React Next app with Material-ui
- css doing nothing - referencing issue - font awesome icon - react
- How to get rid of underline for Link component of React Router?
- How to include a Font Awesome icon in React's render()
- How to get the width of a react element
- How to get "key" prop from React element (on change)?
- How to get "key" prop from React element (on change)?
- How do you center a div element in react w/out external css file
- How to adjust font size to fit view in React Native for Android?
- How do I get an attribute of an element nested in a React component using Jest and/or Enzyme?
- How to set headers for a React app created using 'create-react-app'
- How do I configure my .htaccess file for React App in Subdirectory?
- How to get code completion for typed react component properties?
- react font awesome renders big icon until scales down
- How to over-ride an @media css for a material-ui react component
- Toggling Font Awesome 5 icon with React
- how to get list of all registered synthetic event handlers/listeners for a React Component?
- How to get the react component instance corresponding to event.target element in a click handler?
More Query from same tag
- How can I wait for init config to complete?
- How to validate each character in firstName with yup?
- SQL promise in NodeJS returning empty brackets, but when same query is executed in SQL workbench, it returns the correct data
- Download file with react failed even though the request was successful
- useQuery always returning undefined data in react-query
- What counts as mutating state in React?
- .map on an array of objects within another array: TypeError: Cannot read property 'map' of undefined
- Better way to execute useEffect when boolean changes in one direction?
- How to overwrite React.Component state type from inherited class?
- How to use owl carousel options in React Owl Carousel?
- Serving a static react application behind a Kubernetes Ingress
- Deploying React App to Apache Server
- How to properly type component props in react-router?
- React hooks can only be called inside of the body of a function component error
- React activeClassName property of NavLink not working
- babel 7 Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead
- Change body background with data-theme attribute on click with React
- laravel broadcasting - client receives one response several times
- React: How to inherit PropTypes?
- Tailwind dark mode toggle works but styles do not change
- Parent state change generates a child re-render when the child does not have that state as a prop [Virtual DOM]
- Page reloads on click of a Link in React
- TypeError: oldCities is not iterable
- how do I pass all these function using only one context
- How to add round edges on top bar of dynamically created stacked bars using Recharts?
- How to upload a single file with a title using busboy
- How to render react component from a json object?
- JSON to Array react, jquery
- How can I pass entire card to another component on onClick button in ReactJS?
- Javascript - How to loop through an array over and over again in React