You need to add and configure babel macros.Īllows icons to be subsetted, optimizing your final bundle. Only the icons you use are included in the bundle. Here's a handy table comparing the ways you can add icons with React: OptionĪutomatically includes just the icons you're using in your components, optimizing your final bundle. If you can't dynamically import icons, we have a couple of other options available. Import from // // Defaults to the Classic family, Solid style // Defaults to Classic family // Setting both family and style // Thin // Duotone // Sharp Solid // Sharp Regular // Sharp Light // A brand icon