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

# Function: getIcon()

> **getIcon**(`name`): [`PantokenIcon`](../interfaces/PantokenIcon.md) | `undefined`

Beta

Look up an icon by name.

## Parameters

### name

`string`

## Returns

[`PantokenIcon`](../interfaces/PantokenIcon.md) | `undefined`

## Example

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

const icon = getIcon("arrow-left");
icon?.viewBox; // "0 0 24 24"
```
