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

# Interface: PantokenPlugin

Beta

A pantoken plugin. Every hook is optional; a plugin participates only in the stages it defines a
hook for. The same plugin can therefore inject at more than one layer.

## Properties

### name

> **name**: `string`

Beta

A unique, human-readable plugin name.

## Methods

### tokens()?

> `optional` **tokens**(`ctx`): `void` | [`Token`](Token.md)\[]

Beta

Token stage: return the full replacement token list.

#### Parameters

##### ctx

[`TokenHookContext`](TokenHookContext.md)

#### Returns

`void` | [`Token`](Token.md)\[]

***

### icons()?

> `optional` **icons**(`ctx`): `void` | [`IconEntry`](IconEntry.md)\[]

Beta

Icon stage: return new [IconEntry](IconEntry.md) records to register as `<image>` tokens.
Returning `undefined` or an empty array leaves the current set unchanged.

#### Parameters

##### ctx

[`IconHookContext`](IconHookContext.md)

#### Returns

`void` | [`IconEntry`](IconEntry.md)\[]

***

### css()?

> `optional` **css**(`ctx`): `void` | [`CssContribution`](CssContribution.md)

Beta

CSS stage: contribute or post-process CSS.

#### Parameters

##### ctx

[`CssHookContext`](CssHookContext.md)

#### Returns

`void` | [`CssContribution`](CssContribution.md)

***

### rehype()?

> `optional` **rehype**(`ctx`): `void` | { `resolve?`: [`IconResolver`](../type-aliases/IconResolver.md); }

Beta

Rehype stage: provide a resolver merged into the rehype plugin.

#### Parameters

##### ctx

[`RehypeHookContext`](RehypeHookContext.md)

#### Returns

`void` | { `resolve?`: [`IconResolver`](../type-aliases/IconResolver.md); }

***

### native()?

> `optional` **native**(`ctx`): `void`

Beta

Native stage (Style Dictionary): register transforms/formats.

#### Parameters

##### ctx

`unknown`

#### Returns

`void`
