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:
- Import FontAwesome via a URL like this: https://use.fontawesome.com/releases/v5.15.4/css/all.css
- 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.
Properties
Section titled “Properties”icon: string
Section titled “icon: string”The name of the icon. This must match the name of the icon in FontAwesome, minus the
fa prefix (which is added for you).
Example
Section titled “Example”<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.