Skip to main content
Version: 0.3.x

Package

Default export

In every iconset package, it provides few thing from the exports:

nametypedescription
IconsetComponent<IconProps>(Default export) The iconset component contain all variants and content
variantsRecord<string, Component<IconProps>>Indvidual groupped component by variant name.
mapRecord<string, Record<string, IconSVG>>Raw data of the icon, grouped by variant and icon name
colorizebooleanGiven true if the iconset support coloring to the content
iconNamesArray<string>The list of icon names
variantNamesArray<string>The list of variant names

Specified icon

If you need specified icon(s) only, you are allowed to import one or serveal files that you only needed.

You can follow below pattern when import from the package

package-name/icons/variant name/icon name

Example:

import HeartIconData from "@svgr-iconkit/fontawesome/icons/regular/heart"
import { Icon } from "@svgr-iconkit/core"

export default () => {
return <Icon content={HeartIconData} size="24" color="blue" />
}

Example

Demo on codesandbox