# Contents

- Base icons folders and files
- IconsCache
- Icons typing

# Description

This folder includes definitions and types for the base icons that are most commonly used in Veracity projects.

This collection of icons is defined in Figma:

- [Icon Library](https://www.figma.com/file/HaD3etCg6DRCBBhjp7jyzr/Icon-Library?node-id=1%3A8)
- [Brand Assets (Legacy)](https://www.figma.com/file/iYTcKdCL7ZcCfpoHGacpXO/Ver-DS-3.0-%E2%80%93-Brand-Assets?node-id=1%3A8)

It also includes an IconsCache singleton. Icons in the cache will be used directly, while all other icons will be loaded from Veracity CDN at runtime. By default, selected few icons (~15) are included in the cache. Consumers can add more icons to the cache in individual projects.

Each icon is defined using an object following a standard Font Awesome data structure. See types.ts for more details. Icon files are named as camelCase icon name with a category prefix, such as fal (Font Awesome Light) or cus (Custom Solid).

VuiIcon string union type is used to provide typing and autocompletion for the Icon component's 'name' prop. It can be extended by augmenting VuiIcons dictionary.

# Adding new icons

Please follow instructions from the `/scripts/iconTransformer/readme.md` file at the root of the repository.
