Skip to content

Icon

Component | Source Code

extends Omit<ComponentPropsWithRef<“span”>, “children”>

Props Inheritance Hierarchy: Omit<ComponentPropsWithRef<“span”>, “children”>

Renders an icon from FontAwesome. Note that for this component to work, you MUST either:

  1. Import FontAwesome via a URL like this: https://use.fontawesome.com/releases/v5.15.4/css/all.css
  2. Include FontAwesome in your project yourself another way

If your icon doesn’t seem to be appearing and you’ve verified that you’re including FontAwesome in your project, try verifying and changing the iconType.

The name of the icon. This must match the name of the icon in FontAwesome, minus the fa prefix (which is added for you).

<Icon iconType="solid" icon="address-card" />

iconType?: “solid” | “brand” | “regular”

Section titled “iconType?: “solid” | “brand” | “regular””

(Optional, defaults to 'solid') The type of icon. This affects the style of the icon pulled from FontAwesome.