---
url: /api/formats/icons/src/functions/buildIconResolverChain.md
---
[pantoken-root](../../../../index.md) / [formats/icons/src](../index.md) / buildIconResolverChain

# Function: buildIconResolverChain()

> **buildIconResolverChain**(`options`): [`IconResolver`](../../../../packages/core/src/type-aliases/IconResolver.md)

Beta

Build the shared icon-resolver chain: an explicit `resolve` first, then the built-in pantoken
icon set, then plugin `rehype` resolvers (so a plugin can add codes the built-in set doesn't
know, but never shadow a built-in icon name). Used by `@pantoken/rehype` and
`@pantoken/markdown-it` so the resolution order stays identical across renderers.

## Parameters

### options

[`IconResolverChainOptions`](../interfaces/IconResolverChainOptions.md)

## Returns

[`IconResolver`](../../../../packages/core/src/type-aliases/IconResolver.md)

## Example

```ts
import { buildIconResolverChain } from "@pantoken/icons";

const resolveIcon = buildIconResolverChain({ plugins: [myBrandIconsPlugin] });
resolveIcon("arrow-left"); // { name, svg, viewBox, source } | undefined
```
