Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@fortawesome/free-brands-svg-icons
Advanced tools
@fortawesome/free-brands-svg-icons is a package that provides a collection of brand icons as SVGs. These icons can be used in web applications to represent various brands, such as social media platforms, technology companies, and other well-known entities. The package is part of the Font Awesome icon library, which is widely used for adding scalable vector icons to web projects.
Importing and Using Icons
This feature allows you to import specific brand icons from the package and add them to the Font Awesome library. The `dom.watch()` method ensures that the icons are rendered correctly in the DOM.
const { faFacebook, faTwitter } = require('@fortawesome/free-brands-svg-icons');
const { library, dom } = require('@fortawesome/fontawesome-svg-core');
library.add(faFacebook, faTwitter);
dom.watch();
Using Icons in React
This feature demonstrates how to use the brand icons in a React application. By importing the `FontAwesomeIcon` component from `@fortawesome/react-fontawesome` and the specific icons from `@fortawesome/free-brands-svg-icons`, you can easily include these icons in your React components.
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFacebook, faTwitter } from '@fortawesome/free-brands-svg-icons';
function App() {
return (
<div>
<FontAwesomeIcon icon={faFacebook} />
<FontAwesomeIcon icon={faTwitter} />
</div>
);
}
export default App;
Using Icons in HTML
This feature shows how to use the brand icons directly in an HTML file by including the Font Awesome CDN. The `fab` class is used to specify that the icon is a brand icon, followed by the specific icon class (e.g., `fa-facebook`, `fa-twitter`).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<title>Document</title>
</head>
<body>
<i class="fab fa-facebook"></i>
<i class="fab fa-twitter"></i>
</body>
</html>
The `react-icons` package provides a collection of popular icons for React applications, including Font Awesome, Material Design, and others. It offers a more extensive set of icons from various libraries, making it a versatile choice for developers who need icons from multiple sources.
The `simple-icons` package offers a collection of SVG icons for popular brands. It focuses on providing a consistent and straightforward set of brand icons, similar to `@fortawesome/free-brands-svg-icons`, but with a different design approach.
"I came here to chew bubblegum and install Font Awesome 6 - and I'm all out of bubblegum"
$ npm i --save @fortawesome/free-brands-svg-icons
Or
$ yarn add @fortawesome/free-brands-svg-icons
Get started here. Continue your journey here.
Or go straight to the API documentation.
Start with GitHub issues and ping us on Twitter if you need to.
FAQs
The iconic font, CSS, and SVG framework
The npm package @fortawesome/free-brands-svg-icons receives a total of 458,281 weekly downloads. As such, @fortawesome/free-brands-svg-icons popularity was classified as popular.
We found that @fortawesome/free-brands-svg-icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.