toggle-category
title: Assign category to icons in icon set
types:
IconSet: './index.md'
IconifyJSON: '/docs/types/iconify-json.md'
IconCategory: './categories.md'
functions:
categories: './categories.md'
toggleCategory()
This function is part of [type]IconSet class in Iconify Tools.
Function [func]toggleCategory() adds category to icon.
Categories are used to filter icons when displayng icon set.
Usage
Function has the following parameter:
[prop]iconName,[type]string. Icon name.[prop]category,[type]string. Category name.[prop]add,[type]boolean. Iftrue, category will be added to icon. Iffalse, category will be removed.
Function returns true on success, false on failure.
Example
src: libraries/tools/icon-set/list-category.ts
title: 'example.ts'
这篇文档对你有帮助吗?
谢谢你的反馈!