This extension adds a field type to Directus that allows you to select an icon from the Iconify library.
It will save the icon name as string in the database.
You can use the field in your frontend to display the icon by using one of the Iconify components.
pnpm i directus-extension-iconify -D # with pnpm
yarn add directus-extension-iconify -D # with yarn
npm i directus-extension-iconify --save-dev # with npm
- Go to your directus collection and create a new field
- Select Iconify Dropdown as field type within the group "Selection"
- Add your key
- If you to use a custom icon library, you can add it to the whitelist in the extension settings
- Click "Continue in Advance Field Creation Mode"
- Go to the Display tab and select "Iconify Icon" as display type
- Save the field
Now you can use the field in your collection.