@fortawesome/angular-fontawesome

  • Version 0.9.0
  • Published
  • 308 kB
  • 1 dependency
  • MIT license

Install

npm i @fortawesome/angular-fontawesome
yarn add @fortawesome/angular-fontawesome
pnpm add @fortawesome/angular-fontawesome

Overview

Angular Fontawesome, an Angular library

Index

Classes

class FaConfig

class FaConfig {}

    property defaultPrefix

    defaultPrefix: any;
    • Default prefix to use, when one is not provided with the icon name.

      'fas'

    property fallbackIcon

    fallbackIcon: any;
    • Provides a fallback icon to use whilst main icon is being loaded asynchronously. When value is null, then fa-icon component will throw an error if icon input is missing. When value is not null, then the provided icon will be used as a fallback icon if icon input is missing.

      null

    property fixedWidth

    fixedWidth?: boolean;
    • Set icons to the same fixed width.

      See Also

      • {@link: https://fontawesome.com/how-to-use/on-the-web/styling/fixed-width-icons} false

    property globalLibrary

    globalLibrary: boolean | 'unset';
    • Whether components should lookup icon definitions in the global icon library (the one available from import { library } from '@fortawesome/fontawesome-svg-core').

      See https://github.com/FortAwesome/angular-fontawesome/blob/master/docs/usage/icon-library.md for detailed description of library modes.

      - 'unset' - Components should lookup icon definitions in the global library and emit warning if they find a definition there. This option is a default to assist existing applications with a migration. Applications are expected to switch to using FaIconLibrary. - true - Components should lookup icon definitions in the global library. Note that global icon library is deprecated and support for it will be removed. This option can be used to temporarily suppress warnings. - false - Components should not lookup icon definitions in the global library. Library will throw an error if missing icon is found in the global library.

      Deprecated

      This option is deprecated since 0.5.0. In 0.6.0 default will be changed to false. In 0.8.0 the option will be removed together with the support for the global icon library.

      false

    class FaDuotoneIconComponent

    class FaDuotoneIconComponent extends FaIconComponent {}

      property primaryColor

      primaryColor?: string;
      • Customize the color of the primary icon layer. Accepts any valid CSS color value.

        CSS inherited color

      property primaryOpacity

      primaryOpacity?: string | number;
      • Customize the opacity of the primary icon layer. Valid values are in range [0, 1.0].

        1.0

      property secondaryColor

      secondaryColor?: string;
      • Customize the color of the secondary icon layer. Accepts any valid CSS color value.

        CSS inherited color

      property secondaryOpacity

      secondaryOpacity?: string | number;
      • Customize the opacity of the secondary icon layer. Valid values are in range [0, 1.0].

        0.4

      property swapOpacity

      swapOpacity?: boolean | 'true' | 'false';
      • Swap the default opacity of each duotone icon’s layers. This will make an icon’s primary layer have the default opacity of 40% rather than its secondary layer.

        false

      method buildParams

      protected buildParams: () => {
      title: string;
      transform: import('@fortawesome/fontawesome-svg-core').Transform;
      classes: string[];
      mask: IconDefinition;
      styles: import('@fortawesome/fontawesome-svg-core').Styles;
      symbol: import('@fortawesome/fontawesome-svg-core').FaSymbol;
      attributes: { role: string };
      };

        method findIconDefinition

        protected findIconDefinition: (
        i: IconProp | IconDefinition
        ) => IconDefinition | null;

          class FaIconComponent

          class FaIconComponent implements OnChanges {}

            constructor

            constructor(
            sanitizer: any,
            config: FaConfig,
            iconLibrary: FaIconLibrary,
            stackItem: FaStackItemSizeDirective,
            stack: FaStackComponent
            );

              property a11yRole

              a11yRole: string;
              • Specify the role attribute for the rendered element.

                'img'

              property border

              border?: boolean;

                property classes

                classes?: string[];

                  property fixedWidth

                  fixedWidth?: boolean;

                    property flip

                    flip?: any;

                      property icon

                      icon: any;

                        property inverse

                        inverse?: boolean;

                          property mask

                          mask?: any;

                            property pull

                            pull?: any;

                              property pulse

                              pulse?: boolean;

                                property renderedIconHTML

                                renderedIconHTML: any;

                                  property rotate

                                  rotate?: any;

                                    property size

                                    size?: any;

                                      property spin

                                      spin?: boolean;

                                        property styles

                                        styles?: any;

                                          property symbol

                                          symbol?: any;

                                            property title

                                            title?: string;
                                            • Specify a title for the icon. This text will be displayed in a tooltip on hover and presented to the screen readers.

                                            property transform

                                            transform?: any;

                                              method buildParams

                                              protected buildParams: () => {
                                              title: string;
                                              transform: Transform;
                                              classes: string[];
                                              mask: IconDefinition;
                                              styles: Styles;
                                              symbol: FaSymbol;
                                              attributes: { role: string };
                                              };

                                                method findIconDefinition

                                                protected findIconDefinition: (
                                                i: IconProp | IconDefinition
                                                ) => IconDefinition | null;

                                                  method ngOnChanges

                                                  ngOnChanges: (changes: any) => never;

                                                    method render

                                                    render: () => void;
                                                    • Programmatically trigger rendering of the icon.

                                                      This method is useful, when creating FaIconComponent dynamically or changing its inputs programmatically as in these cases icon won't be re-rendered automatically.

                                                    class FaIconLibrary

                                                    class FaIconLibrary implements FaIconLibraryInterface {}

                                                      method addIconPacks

                                                      addIconPacks: (...packs: IconPack[]) => void;

                                                        method addIcons

                                                        addIcons: (...icons: IconDefinition[]) => void;

                                                          method getIconDefinition

                                                          getIconDefinition: (prefix: any, name: any) => IconDefinition | null;

                                                            class FaLayersComponent

                                                            class FaLayersComponent implements OnInit, OnChanges {}
                                                            • Fontawesome layers.

                                                            constructor

                                                            constructor(renderer: any, elementRef: any, config: FaConfig);

                                                              property fixedWidth

                                                              fixedWidth?: boolean;

                                                                property size

                                                                size?: any;

                                                                  method ngOnChanges

                                                                  ngOnChanges: (changes: any) => void;

                                                                    method ngOnInit

                                                                    ngOnInit: () => void;

                                                                      class FaLayersCounterComponent

                                                                      class FaLayersCounterComponent implements OnChanges {}

                                                                        constructor

                                                                        constructor(parent: FaLayersComponent, sanitizer: any);

                                                                          property classes

                                                                          classes?: string[];

                                                                            property content

                                                                            content: string;

                                                                              property renderedHTML

                                                                              renderedHTML: any;

                                                                                property styles

                                                                                styles?: any;

                                                                                  property title

                                                                                  title?: string;

                                                                                    method buildParams

                                                                                    protected buildParams: () => any;

                                                                                      method ngOnChanges

                                                                                      ngOnChanges: (changes: any) => void;

                                                                                        class FaLayersTextComponent

                                                                                        class FaLayersTextComponent implements OnChanges {}

                                                                                          constructor

                                                                                          constructor(parent: FaLayersComponent, sanitizer: any);

                                                                                            property border

                                                                                            border?: boolean;

                                                                                              property classes

                                                                                              classes?: string[];

                                                                                                property content

                                                                                                content: string;

                                                                                                  property fixedWidth

                                                                                                  fixedWidth?: boolean;

                                                                                                    property flip

                                                                                                    flip?: any;

                                                                                                      property inverse

                                                                                                      inverse?: boolean;

                                                                                                        property pull

                                                                                                        pull?: any;

                                                                                                          property pulse

                                                                                                          pulse?: boolean;

                                                                                                            property renderedHTML

                                                                                                            renderedHTML: any;

                                                                                                              property rotate

                                                                                                              rotate?: any;

                                                                                                                property size

                                                                                                                size?: any;

                                                                                                                  property spin

                                                                                                                  spin?: boolean;

                                                                                                                    property styles

                                                                                                                    styles?: any;

                                                                                                                      property title

                                                                                                                      title?: string;

                                                                                                                        property transform

                                                                                                                        transform?: any;

                                                                                                                          method buildParams

                                                                                                                          protected buildParams: () => any;
                                                                                                                          • Updating params by component props.

                                                                                                                          method ngOnChanges

                                                                                                                          ngOnChanges: (changes: any) => void;

                                                                                                                            class FaStackComponent

                                                                                                                            class FaStackComponent implements OnInit, OnChanges {}

                                                                                                                              constructor

                                                                                                                              constructor(renderer: any, elementRef: any);

                                                                                                                                property size

                                                                                                                                size?: any;
                                                                                                                                • Size of the stacked icon. Note that stacked icon is by default 2 times bigger, than non-stacked icon. You'll need to set size using custom CSS to align stacked icon with a simple one. E.g. fa-stack { font-size: 0.5em; }.

                                                                                                                                method ngOnChanges

                                                                                                                                ngOnChanges: (changes: any) => void;

                                                                                                                                  method ngOnInit

                                                                                                                                  ngOnInit: () => void;

                                                                                                                                    class FaStackItemSizeDirective

                                                                                                                                    class FaStackItemSizeDirective implements OnChanges {}

                                                                                                                                      property stackItemSize

                                                                                                                                      stackItemSize: '1x' | '2x';
                                                                                                                                      • Specify whether icon inside FaStackComponent should be rendered in regular size (1x) or as a larger icon (2x).

                                                                                                                                      method ngOnChanges

                                                                                                                                      ngOnChanges: (changes: any) => void;

                                                                                                                                        class FontAwesomeModule

                                                                                                                                        class FontAwesomeModule {}

                                                                                                                                          Interfaces

                                                                                                                                          interface FaIconLibraryInterface

                                                                                                                                          interface FaIconLibraryInterface {}

                                                                                                                                            method addIconPacks

                                                                                                                                            addIconPacks: (...packs: IconPack[]) => void;

                                                                                                                                              method addIcons

                                                                                                                                              addIcons: (...icons: IconDefinition[]) => void;

                                                                                                                                                method getIconDefinition

                                                                                                                                                getIconDefinition: (prefix: any, name: any) => IconDefinition | null;

                                                                                                                                                  interface FaProps

                                                                                                                                                  interface FaProps {}
                                                                                                                                                  • Fontawesome props.

                                                                                                                                                  property border

                                                                                                                                                  border?: boolean;

                                                                                                                                                    property className

                                                                                                                                                    className?: string;

                                                                                                                                                      property counter

                                                                                                                                                      counter?: boolean;

                                                                                                                                                        property fixedWidth

                                                                                                                                                        fixedWidth?: boolean;

                                                                                                                                                          property flip

                                                                                                                                                          flip?: FlipProp;

                                                                                                                                                            property inverse

                                                                                                                                                            inverse?: boolean;

                                                                                                                                                              property mask

                                                                                                                                                              mask?: IconProp;

                                                                                                                                                                property pull

                                                                                                                                                                pull?: PullProp;

                                                                                                                                                                  property pulse

                                                                                                                                                                  pulse?: boolean;

                                                                                                                                                                    property rotate

                                                                                                                                                                    rotate?: RotateProp;

                                                                                                                                                                      property size

                                                                                                                                                                      size?: SizeProp;

                                                                                                                                                                        property spin

                                                                                                                                                                        spin?: boolean;

                                                                                                                                                                          property stackItemSize

                                                                                                                                                                          stackItemSize?: '1x' | '2x';

                                                                                                                                                                            property style

                                                                                                                                                                            style?: Styles;

                                                                                                                                                                              property symbol

                                                                                                                                                                              symbol?: FaSymbol;

                                                                                                                                                                                property transform

                                                                                                                                                                                transform?: string | Transform;

                                                                                                                                                                                  Package Files (12)

                                                                                                                                                                                  Dependencies (1)

                                                                                                                                                                                  Dev Dependencies (0)

                                                                                                                                                                                  No dev dependencies.

                                                                                                                                                                                  Peer Dependencies (2)

                                                                                                                                                                                  Badge

                                                                                                                                                                                  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/angular-fontawesome.

                                                                                                                                                                                  • Markdown
                                                                                                                                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@fortawesome/angular-fontawesome)
                                                                                                                                                                                  • HTML
                                                                                                                                                                                    <a href="https://www.jsdocs.io/package/@fortawesome/angular-fontawesome"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>