---
url: /api/packages/core/src/functions/runIconPlugins.md
---
[pantoken-root](../../../../index.md) / [packages/core/src](../index.md) / runIconPlugins

# Function: runIconPlugins()

> **runIconPlugins**(`tokens`, `plugins`, `theme?`): [`Token`](../interfaces/Token.md)\[]

Beta

Run every plugin's `icons` hook, letting plugins register extra glyphs as `<image>` tokens.
Each hook receives the current icon list and returns new [IconEntry](../interfaces/IconEntry.md) records to add.
The result is de-duplicated by name.

## Parameters

### tokens

[`Token`](../interfaces/Token.md)\[]

### plugins

readonly [`PantokenPlugin`](../interfaces/PantokenPlugin.md)\[]

### theme?

[`Theme`](../type-aliases/Theme.md) = `"rebrand"`

## Returns

[`Token`](../interfaces/Token.md)\[]

## Example

**Register an extra glyph as an \<image> token**

```ts
import { runIconPlugins, type PantokenPlugin } from "@pantoken/core";
import type { Token } from "@pantoken/model";

const base: Token[] = [];
const star: PantokenPlugin = {
  name: "star",
  icons: () => [{ name: "star", path: "M12 2l3 7h7l-6 4 2 7-6-4-6 4 2-7-6-4h7z" }],
};

const tokens = runIconPlugins(base, [star], "rebrand");
// → adds a --instui-icon-star token whose value is a data-URI SVG
```
