list-category
title: List icons in category in icon set
types:
IconSet: './index.md'
IconifyJSON: '/docs/types/iconify-json.md'
IconCategory: './categories.md#type'
functions:
categories: './categories.md'
listCategory()
This function is part of [type]IconSet class in Iconify Tools.
Function [func]listCategory() lists icons that belong to a category.
Categories are used to filter icons when displaying icon set.
Usage
Function has the following parameter:
[prop]category,[type]string | IconCategory. Category name or item.
Function returns [type]string[] array of icon names.
Result does not include:
This function automatically updates [prop]count property of [type]IconCategory item. If category is empty, category is removed from [func]categories property of icon set.
Example
src: libraries/tools/icon-set/list-category.ts
title: 'example.ts'
这篇文档对你有帮助吗?
谢谢你的反馈!