• Version 6.4.0
  • Published
  • 397 kB
  • 1 dependency
  • MIT license


npm i @fortawesome/fontawesome-svg-core
yarn add @fortawesome/fontawesome-svg-core
pnpm add @fortawesome/fontawesome-svg-core


The iconic font, CSS, and SVG framework



variable config

const config: Config;

    variable dom

    const dom: DOM;

      variable library

      const library: Library;

        variable parse

        const parse: {
        transform(transformString: string): Transform;
        icon(parseIconString: string): IconLookup;


          function counter

          counter: (content: string | number, params?: CounterParams) => Counter;

            function findIconDefinition

            findIconDefinition: (iconLookup: IconLookup) => IconDefinition;

              function icon

              icon: (icon: IconName | IconLookup, params?: IconParams) => Icon;

                function layer

                layer: (
                assembler: (
                addLayerCallback: (layerToAdd: IconOrText | IconOrText[]) => void
                ) => void,
                params?: LayerParams
                ) => Layer;

                  function noAuto

                  noAuto: () => void;

                    function text

                    text: (content: string, params?: TextParams) => Text;

                      function toHtml

                      toHtml: { (content: any): string; (abstractNodes: AbstractElement): string };


                        interface AbstractElement

                        interface AbstractElement {}

                          property attributes

                          attributes: any;

                            property children

                            children?: AbstractElement[];

                              property tag

                              tag: string;

                                interface Attributes

                                interface Attributes {}

                                  index signature

                                  [key: string]: number | string;

                                    interface Config

                                    interface Config {}

                                      property autoA11y

                                      autoA11y: boolean;

                                        property autoAddCss

                                        autoAddCss: boolean;

                                          property autoReplaceSvg

                                          autoReplaceSvg: boolean | 'nest';

                                            property cssPrefix

                                            cssPrefix: string;

                                              property familyDefault

                                              familyDefault: IconFamily;

                                                property familyPrefix

                                                familyPrefix: string;

                                                  property keepOriginalSource

                                                  keepOriginalSource: boolean;

                                                    property measurePerformance

                                                    measurePerformance: boolean;

                                                      property observeMutations

                                                      observeMutations: boolean;

                                                        property replacementClass

                                                        replacementClass: string;

                                                          property searchPseudoElements

                                                          searchPseudoElements: boolean;

                                                            property showMissingIcons

                                                            showMissingIcons: boolean;

                                                              property styleDefault

                                                              styleDefault: IconPrefix | CssStyleClass | IconStyle;

                                                                interface Counter

                                                                interface Counter extends FontawesomeObject {}

                                                                  property type

                                                                  readonly type: 'counter';

                                                                    interface CounterParams

                                                                    interface CounterParams extends Params {}

                                                                      interface DOM

                                                                      interface DOM {}

                                                                        method css

                                                                        css: () => string;

                                                                          method i2svg

                                                                          i2svg: (params?: { node: Node; callback?: () => void }) => Promise<void>;

                                                                            method insertCss

                                                                            insertCss: () => string;

                                                                              method watch

                                                                              watch: () => void;

                                                                                interface FontawesomeObject

                                                                                interface FontawesomeObject {}

                                                                                  property abstract

                                                                                  readonly abstract: AbstractElement[];

                                                                                    property html

                                                                                    readonly html: string[];

                                                                                      property node

                                                                                      readonly node: HTMLCollection;

                                                                                        interface Icon

                                                                                        interface Icon extends FontawesomeObject, IconDefinition {}

                                                                                          property type

                                                                                          readonly type: 'icon';

                                                                                            interface IconParams

                                                                                            interface IconParams extends Params {}

                                                                                              property mask

                                                                                              mask?: IconLookup;

                                                                                                property maskId

                                                                                                maskId?: string;

                                                                                                  property symbol

                                                                                                  symbol?: FaSymbol;

                                                                                                    property transform

                                                                                                    transform?: Transform;

                                                                                                      interface Layer

                                                                                                      interface Layer extends FontawesomeObject {}

                                                                                                        property type

                                                                                                        readonly type: 'layer';

                                                                                                          interface LayerParams

                                                                                                          interface LayerParams {}

                                                                                                            property classes

                                                                                                            classes?: string | string[];

                                                                                                              interface Library

                                                                                                              interface Library {}

                                                                                                                method add

                                                                                                                add: (...definitions: IconDefinitionOrPack[]) => void;

                                                                                                                  method reset

                                                                                                                  reset: () => void;

                                                                                                                    interface Params

                                                                                                                    interface Params {}

                                                                                                                      property attributes

                                                                                                                      attributes?: Attributes;

                                                                                                                        property classes

                                                                                                                        classes?: string | string[];

                                                                                                                          property styles

                                                                                                                          styles?: Styles;

                                                                                                                            property title

                                                                                                                            title?: string;

                                                                                                                              property titleId

                                                                                                                              titleId?: string;

                                                                                                                                interface Styles

                                                                                                                                interface Styles {}

                                                                                                                                  index signature

                                                                                                                                  [key: string]: string;

                                                                                                                                    interface Text

                                                                                                                                    interface Text extends FontawesomeObject {}

                                                                                                                                      property type

                                                                                                                                      readonly type: 'text';

                                                                                                                                        interface TextParams

                                                                                                                                        interface TextParams extends Params {}

                                                                                                                                          property transform

                                                                                                                                          transform?: Transform;

                                                                                                                                            interface Transform

                                                                                                                                            interface Transform {}

                                                                                                                                              property flipX

                                                                                                                                              flipX?: boolean;

                                                                                                                                                property flipY

                                                                                                                                                flipY?: boolean;

                                                                                                                                                  property rotate

                                                                                                                                                  rotate?: number;

                                                                                                                                                    property size

                                                                                                                                                    size?: number;

                                                                                                                                                      property x

                                                                                                                                                      x?: number;

                                                                                                                                                        property y

                                                                                                                                                        y?: number;

                                                                                                                                                          Type Aliases

                                                                                                                                                          type FaSymbol

                                                                                                                                                          type FaSymbol = string | boolean;

                                                                                                                                                            type FlipProp

                                                                                                                                                            type FlipProp = 'horizontal' | 'vertical' | 'both';

                                                                                                                                                              type IconProp

                                                                                                                                                              type IconProp = IconName | [IconPrefix, IconName] | IconLookup;

                                                                                                                                                                type PullProp

                                                                                                                                                                type PullProp = 'left' | 'right';

                                                                                                                                                                  type RotateProp

                                                                                                                                                                  type RotateProp = 90 | 180 | 270;

                                                                                                                                                                    type SizeProp

                                                                                                                                                                    type SizeProp =
                                                                                                                                                                    | '2xs'
                                                                                                                                                                    | 'xs'
                                                                                                                                                                    | 'sm'
                                                                                                                                                                    | 'lg'
                                                                                                                                                                    | 'xl'
                                                                                                                                                                    | '2xl'
                                                                                                                                                                    | '1x'
                                                                                                                                                                    | '2x'
                                                                                                                                                                    | '3x'
                                                                                                                                                                    | '4x'
                                                                                                                                                                    | '5x'
                                                                                                                                                                    | '6x'
                                                                                                                                                                    | '7x'
                                                                                                                                                                    | '8x'
                                                                                                                                                                    | '9x'
                                                                                                                                                                    | '10x';

                                                                                                                                                                      Package Files (1)

                                                                                                                                                                      Dependencies (1)

                                                                                                                                                                      Dev Dependencies (0)

                                                                                                                                                                      No dev dependencies.

                                                                                                                                                                      Peer Dependencies (0)

                                                                                                                                                                      No peer dependencies.


                                                                                                                                                                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@fortawesome/fontawesome-svg-core.

                                                                                                                                                                      • Markdown
                                                                                                                                                                      • HTML
                                                                                                                                                                        <a href="https://www.jsdocs.io/package/@fortawesome/fontawesome-svg-core"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>