tailwindcss-fa Tailwind Templates

Tailwindcss Fa

Tailwind CSS plugin for fontawesome v5 and v6 (free and pro versions).

Tailwind Font Awesome Plugin

This plugin for Tailwind adds Font Awesome font faces and classes to your CSS output dynamically.

Installation

npm install --save-dev https://github.com/mikerdean/tailwindcss-fa.git

Or if you use yarn then:

yarn add --dev https://github.com/mikerdean/tailwindcss-fa.git

You will require the Font Awesome fonts to be available in the file system for your project.

Configuration

Add to your tailwind.config.js:

const fontawesome = require('tailwindcss-fa');

module.exports = {
    theme: {
        // other configuration
    },
    plugins:[
        fontawesome({ version: '5.15.4' })
    ]
};

Options

The plugin takes a configuration object with the following keys with the default settings show below:

{
    brands: false, // enable brand icons
    duotone: false, // enable duotone icons (pro only)
    light: false, // enable light icons (pro only)
    path: null, // path for your font location
    pro: false, // enable pro icon output (free otherwise)
    regular: true, // enable regular icons
    solid: true, // enable solid icons
    thin: false, // enable thin icons (pro v6 only)
    version: '6.0.0-beta2' // font awesome version
}

This plugin supports Font Awesome version 5.0.1 and upwards and can support the free or pro varities.

Top categories

Loading Svelte Themes