or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/npm-fortawesome--fontawesome-free-brands

Font Awesome Free brand icons as SVG with JavaScript modules for React, Vue, Angular and other frameworks

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/@fortawesome/fontawesome-free-brands@5.0.x

To install, run

npx @tessl/cli install tessl/npm-fortawesome--fontawesome-free-brands@5.0.0

index.mddocs/

Font Awesome Free Brands

Font Awesome Free Brands provides a comprehensive collection of 363 brand icons from the Font Awesome Free icon library, specifically designed for SVG with JavaScript implementation. This package enables developers to use brand-specific icons (social media platforms, technology companies, payment providers, and other well-known brands) in modern web applications with full TypeScript support and tree-shaking capabilities.

Package Information

  • Package Name: @fortawesome/fontawesome-free-brands
  • Package Type: npm
  • Language: JavaScript/TypeScript
  • Installation: npm install @fortawesome/fontawesome-free-brands

Core Imports

ES Modules

import { faFacebook, faTwitter, faGithub, prefix } from '@fortawesome/fontawesome-free-brands';

For multiple icons:

import { 
  faFacebook, 
  faTwitter, 
  faInstagram, 
  faLinkedin,
  faGithub,
  IconDefinition 
} from '@fortawesome/fontawesome-free-brands';

For the complete icon pack:

import pack from '@fortawesome/fontawesome-free-brands';

CommonJS

const { faFacebook, faTwitter, faGithub, prefix } = require('@fortawesome/fontawesome-free-brands');

Basic Usage

import { library, icon } from '@fortawesome/fontawesome-svg-core';
import { faFacebook, faTwitter, faGithub } from '@fortawesome/fontawesome-free-brands';

// Add icons to the library
library.add(faFacebook, faTwitter, faGithub);

// Create icon instances
const facebookIcon = icon({ prefix: 'fab', iconName: 'facebook' });
const twitterIcon = icon({ prefix: 'fab', iconName: 'twitter' });

// Insert into DOM
document.body.appendChild(facebookIcon.node[0]);

Architecture

Font Awesome Free Brands is built around several key concepts:

  • IconDefinition Interface: Each icon is a structured object containing SVG path data, dimensions, and metadata
  • Tree-shaking Support: Individual icon imports enable optimal bundle sizes by including only used icons
  • TypeScript Integration: Full type safety with proper interface definitions from @fortawesome/fontawesome-common-types
  • SVG Framework Integration: Designed to work seamlessly with @fortawesome/fontawesome-svg-core for rendering
  • Brand Prefix: All icons use the "fab" (Font Awesome Brand) prefix for consistent identification

Capabilities

Individual Icon Access

Access any of the 363 brand icons as individual named exports, each following the fa{BrandName} camelCase naming convention.

// Social Media Icons
export const faFacebook: IconDefinition;
export const faFacebookF: IconDefinition;
export const faFacebookSquare: IconDefinition;
export const faFacebookMessenger: IconDefinition;
export const faTwitter: IconDefinition;
export const faTwitterSquare: IconDefinition;
export const faInstagram: IconDefinition;
export const faLinkedin: IconDefinition;
export const faLinkedinIn: IconDefinition;
export const faYoutube: IconDefinition;
export const faYoutubeSquare: IconDefinition;

// Technology & Development Icons
export const faGithub: IconDefinition;
export const faGithubAlt: IconDefinition;
export const faGithubSquare: IconDefinition;
export const faGitlab: IconDefinition;
export const faGit: IconDefinition;
export const faGitSquare: IconDefinition;
export const faStackOverflow: IconDefinition;
export const faCodepen: IconDefinition;
export const faReact: IconDefinition;
export const faAngular: IconDefinition;
export const faVuejs: IconDefinition;
export const faNodeJs: IconDefinition;
export const faNpm: IconDefinition;

// Payment & E-commerce Icons
export const faPaypal: IconDefinition;
export const faStripe: IconDefinition;
export const faStripeS: IconDefinition;
export const faApplePay: IconDefinition;
export const faAmazonPay: IconDefinition;
export const faCcVisa: IconDefinition;
export const faCcMastercard: IconDefinition;
export const faCcAmex: IconDefinition;
export const faCcPaypal: IconDefinition;

// Operating Systems & Browsers
export const faWindows: IconDefinition;
export const faApple: IconDefinition;
export const faLinux: IconDefinition;
export const faAndroid: IconDefinition;
export const faChrome: IconDefinition;
export const faFirefox: IconDefinition;
export const faSafari: IconDefinition;
export const faEdge: IconDefinition;

// Gaming & Entertainment
export const faPlaystation: IconDefinition;
export const faXbox: IconDefinition;
export const faNintendoSwitch: IconDefinition;
export const faSteam: IconDefinition;
export const faTwitch: IconDefinition;
export const faSpotify: IconDefinition;

// Cloud & Infrastructure
export const faAws: IconDefinition;
export const faDigitalOcean: IconDefinition;
export const faDocker: IconDefinition;

// Additional icons (300+ more available)
// Complete list includes all major brands across categories:
// - Social platforms (Discord, Snapchat, TikTok, etc.)
// - Development tools (Jenkins, GitKraken, etc.)
// - Cryptocurrency (Bitcoin, Ethereum, etc.)
// - Media platforms (Medium, WordPress, etc.)
// - Communication apps (Slack, Telegram, WhatsApp, etc.)
// - Star Wars themed icons
// - And many more...

Icon Pack Access

Access all brand icons as a complete pack for bulk operations.

declare const pack: IconPack;
export default pack;

Prefix Access

Access the icon prefix constant for programmatic usage.

export const prefix: 'fab';

Type Definitions

Complete TypeScript integration with shared type definitions.

// Re-exported from @fortawesome/fontawesome-common-types
export interface IconDefinition {
  prefix: IconPrefix;
  iconName: IconName;
  icon: [
    number, // width
    number, // height
    string[], // ligatures
    string, // unicode
    string // svgPathData
  ];
}

export interface IconLookup {
  prefix: IconPrefix;
  iconName: IconName;
}

export type IconName = string;
export type IconPrefix = 'fab'; // Always 'fab' for brand icons
export interface IconPack {
  [key: string]: IconDefinition;
}

Usage Examples

Framework Integration

React with Font Awesome:

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFacebook, faTwitter } from '@fortawesome/fontawesome-free-brands';

function SocialIcons() {
  return (
    <div>
      <FontAwesomeIcon icon={faFacebook} />
      <FontAwesomeIcon icon={faTwitter} />
    </div>
  );
}

Vue with Font Awesome:

import { library } from '@fortawesome/fontawesome-svg-core';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
import { faGithub, faLinkedin } from '@fortawesome/fontawesome-free-brands';

library.add(faGithub, faLinkedin);

// In template: <font-awesome-icon :icon="['fab', 'github']" />

Direct SVG Access

import { faTwitter, prefix } from '@fortawesome/fontawesome-free-brands';

// Icon structure
console.log(faTwitter);
// {
//   prefix: 'fab',
//   iconName: 'twitter', 
//   icon: [512, 512, [], "f099", "M459.37 151.716c.325..."]
// }

// Use the prefix constant
console.log(prefix); // 'fab'

// Extract SVG path data
const [width, height, ligatures, unicode, pathData] = faTwitter.icon;

Conditional Loading

import type { IconDefinition } from '@fortawesome/fontawesome-free-brands';

async function loadSocialIcon(platform: string): Promise<IconDefinition> {
  switch (platform) {
    case 'facebook':
      const { faFacebook } = await import('@fortawesome/fontawesome-free-brands');
      return faFacebook;
    case 'twitter':
      const { faTwitter } = await import('@fortawesome/fontawesome-free-brands');
      return faTwitter;
    case 'github':
      const { faGithub } = await import('@fortawesome/fontawesome-free-brands');
      return faGithub;
    default:
      throw new Error(`Unknown platform: ${platform}`);
  }
}

Icon Discovery

import pack from '@fortawesome/fontawesome-free-brands';

// List all available brand icons
const availableIcons = Object.keys(pack);
console.log(`Available icons: ${availableIcons.length}`); // 363

// Find icons by pattern
const socialIcons = availableIcons.filter(name => 
  ['facebook', 'twitter', 'instagram', 'linkedin'].some(social => 
    name.toLowerCase().includes(social)
  )
);

Complete Icon Categories

Social Media & Communication (40+ icons)

Facebook, Twitter, Instagram, LinkedIn, YouTube, Snapchat, TikTok, Discord, Slack, Telegram, WhatsApp, Skype, Viber, Line, WeChat, VKontakte, and more.

Technology & Development (50+ icons)

GitHub, GitLab, Stack Overflow, CodePen, React, Angular, Vue.js, Node.js, Python, PHP, Java, Docker, Jenkins, and development tools.

Payment & E-commerce (20+ icons)

PayPal, Stripe, Apple Pay, Amazon Pay, Visa, Mastercard, American Express, Bitcoin, Ethereum, and other payment methods.

Operating Systems & Browsers (15+ icons)

Windows, macOS, Linux, Android, Chrome, Firefox, Safari, Edge, Opera, and other platforms.

Gaming & Entertainment (25+ icons)

PlayStation, Xbox, Nintendo Switch, Steam, Twitch, Spotify, iTunes, Google Play, and entertainment platforms.

Cloud & Infrastructure (15+ icons)

AWS, Google Cloud, Digital Ocean, Docker, Kubernetes, and cloud services.

Media & Publishing (30+ icons)

Medium, WordPress, Blogger, Tumblr, Flickr, Vimeo, IMDb, and content platforms.

Cryptocurrency (10+ icons)

Bitcoin, Ethereum, Litecoin, and other digital currencies.

Star Wars Collection (15+ icons)

Jedi Order, Sith, First Order, Galactic Republic, Empire, Rebel Alliance, and other Star Wars symbols.

Additional Categories (100+ icons)

Creative Commons, font foundries, SaaS tools, analytics platforms, email services, and specialized brand icons.

Integration Requirements

This package requires the Font Awesome SVG Core library for rendering icons in web applications:

npm install @fortawesome/fontawesome-svg-core

For framework-specific integration, additional packages may be needed:

  • React: @fortawesome/react-fontawesome
  • Vue: @fortawesome/vue-fontawesome
  • Angular: @fortawesome/angular-fontawesome