# classifyIcon

Canonical: https://docs.shumoku.dev/en/library/api/classifyIcon
Language: en

@shumoku/core · 0.4.0 · function

# classifyIcon

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/icons/resolve.ts#L31)

Classify a raw icon string into inline-SVG vs URL. Inline content starts with \`<\` (either a bare \`<path .../>\` fragment or a full \`<svg>...</svg>\` block). Anything else is treated as a URL, including \`data:\` URIs.

```
classifyIcon(icon: string | undefined): ResolvedIcon | null
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `icon` | `string | undefined` | No additional description. | `—` |

## Returns

```
ResolvedIcon | null
```

[`libs/@shumoku/core/src/icons/resolve.ts:31`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/icons/resolve.ts#L31)
