Custom icon sets in Iconify for Tailwind CSS
This documentation covers iconSets option for addDynamicIconSelectors plugin.
iconSets option
Option iconSets allows you to use custom icon sets with plugin.
Option is an object, where key is an icon set prefix, and value is one of the following:
- string: location of icon set JSON file in IconifyJSON format.
- IconifyJSON: loaded icon set.
- function: callback that returns IconifyJSON icon set. Due to Tailwind plugin system limitations, callback must be synchronous.
Make sure icon set includes info property with palette set. Plugin uses this to tell if an icon set contains icons with hardcoded palette or monotone icons. Mixed icon sets cannot be used. See IconifyInfo type.
js
addDynamicIconSelectors({
iconSets: {
test: './icon-sets/test.json',
},
});